QWebEngineView proxy authentication
Qt WebEngine is Chromium-backed. A request through ordinary Qt networking can prove that your proxy credentials are valid, but it does not prove that the browser path is using that proxy or answering WebEngine proxy-auth challenges.
QApplication or a WebEngine object already exists.QWebEngineView shows a blank page, loadFinished(False), or the direct public IP instead of the proxy IP.QNetworkProxy.setApplicationProxy(proxy) before creating QApplication and before any WebEngine object exists.QWebEnginePage.proxyAuthenticationRequired on the page that will load the target.proxy_config = ProxyConfig(
host=os.environ["PROXY_HOST"],
port=int(os.environ["PROXY_PORT"]),
user=os.environ["PROXY_USER"],
password=os.environ["PROXY_PASSWORD"],
)
configure_application_proxy(proxy_config)
app = QApplication(sys.argv)
view = QWebEngineView()
view.page().proxyAuthenticationRequired.connect(handle_proxy_auth)
Qt's own WebEngine docs describe that WebEngine forwards Qt proxy settings to Chromium and emits proxyAuthenticationRequired when proxy credentials are needed. The Qt for Python simple-browser example also subclasses WebEngine page/view objects to handle HTTP and proxy authentication.
quadproxy doctor diagnostics that separate install, reachability, authentication, public-IP, and target-load failures.QuadProxy is not a proxy provider. Bring your own authenticated HTTP proxy account.
quadproxy doctor diagnostics for install, proxy reachability, authentication, WebEngine initialization, and public-IP verification.Buy only if you already have an authenticated HTTP proxy account and want packaged source, diagnostics, and support instead of wiring this from scratch. QNetworkProxy works but WebEngine ignores proxy? • Back to the product page