Simple question: is it possible to whitelist an URL (or a domain) for proxy in Qt WebEngine?
When using other Qt modules that rely on Qt Network, it is possible to set a per URL proxy using QNetworkProxyFactory::queryProxy()
like so:
QList<QNetworkProxy> MyProxyFactory::queryProxy(const QNetworkProxyQuery &query)
{
if (whitelist.contains(query.url)) {
return { QNetworkProxy::NoProxy };
}
...
}
However, Qt WebEngine does not use Qt Network, but chromium network stack. Still Qt Web Engine does use Qt application level proxy, but only to a limited extent. Qt WebEngine basically just copies proxy host and port from Qt Network proxy to chromium network stack. Qt WebEngine does not call QNetworkProxyFactory::queryProxy()
for each request.
Is there any other way to achieve the same result of having no proxy on some URLs and a proxy for all other URLs?