QtWebEngine/Network: Difference between revisions
(Created page with "Qt WebEngine uses the Chromium networking stack instead of Qt Network. This also means that the setup of proxies might differ. In general, Qt WebEngine should follow the 'leas...") |
No edit summary |
||
Line 1: | Line 1: | ||
Qt WebEngine uses the Chromium networking stack instead of Qt Network. This also means that the setup of proxies might differ. In general, Qt WebEngine should follow the 'least surprising route' and follow the proxy settings of Qt Network. | Qt WebEngine uses the Chromium networking stack instead of Qt Network. This also means that the setup of proxies might differ. In general, Qt WebEngine should follow the 'least surprising route' and follow the proxy settings of Qt Network. | ||
=== Proxy resolution in Qt Network === | |||
Qt Network has multiple ways to set proxies for client connections: | Qt Network has multiple ways to set proxies for client connections: | ||
Line 8: | Line 9: | ||
- [http://doc.qt.io/qt-5/qnetworkproxyfactory.html#setApplicationProxyFactory QNetworkProxyFactory::setApplicationProxyFactory] | - [http://doc.qt.io/qt-5/qnetworkproxyfactory.html#setApplicationProxyFactory QNetworkProxyFactory::setApplicationProxyFactory] | ||
=== Proxy resolution in Qt WebEngine === | |||
Qt WebEngine checks QNetworkProxy::applicationProxy once. If there is a proxy set, it is used for Chromium connections too (see [https://code.woboq.org/qt5/qtwebengine/src/core/proxy_config_service_qt.cpp.html#_ZN20ProxyConfigServiceQt20GetLatestProxyConfigEPN3net11ProxyConfigE proxy_config_service_qt.cpp]). If not, Chromium will try to use the system proxy settings. | Qt WebEngine checks QNetworkProxy::applicationProxy once. If there is a proxy set, it is used for Chromium connections too (see [https://code.woboq.org/qt5/qtwebengine/src/core/proxy_config_service_qt.cpp.html#_ZN20ProxyConfigServiceQt20GetLatestProxyConfigEPN3net11ProxyConfigE proxy_config_service_qt.cpp]). If not, Chromium will try to use the system proxy settings. | ||
Line 14: | Line 15: | ||
''Note:'' The code path used to auto-detect proxy settings in the network differ, depending on whether --single-process is used. See https://codereview.qt-project.org/#/c/115567/ for details. | ''Note:'' The code path used to auto-detect proxy settings in the network differ, depending on whether --single-process is used. See https://codereview.qt-project.org/#/c/115567/ for details. | ||
=== Links === | |||
http://doc.qt.io/qt-5/qtwebengine-overview.html#proxy-support | http://doc.qt.io/qt-5/qtwebengine-overview.html#proxy-support |
Revision as of 06:20, 18 October 2016
Qt WebEngine uses the Chromium networking stack instead of Qt Network. This also means that the setup of proxies might differ. In general, Qt WebEngine should follow the 'least surprising route' and follow the proxy settings of Qt Network.
Proxy resolution in Qt Network
Qt Network has multiple ways to set proxies for client connections: - QAbstractSocket::setProxy - QNetworkProxy::setApplicationProxy - QNetworkProxyFactory::setApplicationProxyFactory
Proxy resolution in Qt WebEngine
Qt WebEngine checks QNetworkProxy::applicationProxy once. If there is a proxy set, it is used for Chromium connections too (see proxy_config_service_qt.cpp). If not, Chromium will try to use the system proxy settings.
Note: The code path used to auto-detect proxy settings in the network differ, depending on whether --single-process is used. See https://codereview.qt-project.org/#/c/115567/ for details.
Links
http://doc.qt.io/qt-5/qtwebengine-overview.html#proxy-support