QNetworkProxyFactory

PyQt5.QtNetwork.QNetworkProxyFactory

Description

The QNetworkProxyFactory class provides fine-grained proxy selection.

QNetworkProxyFactory is an extension to QNetworkProxy, allowing applications to have a more fine-grained control over which proxy servers are used, depending on the socket requesting the proxy. This allows an application to apply different settings, according to the protocol or destination hostname, for instance.

QNetworkProxyFactory can be set globally for an application, in which case it will override any global proxies set with setApplicationProxy(). If set globally, any sockets created with Qt will query the factory to determine the proxy to be used.

A factory can also be set in certain frameworks that support multiple connections, such as QNetworkAccessManager. When set on such object, the factory will be queried for sockets created by that framework only.

System Proxies

You can configure a factory to use the system proxy’s settings. Call the setUseSystemConfiguration() function with true to enable this behavior, or false to disable it.

Similarly, you can use a factory to make queries directly to the system proxy by calling its systemProxyForQuery() function.

Warning: Depending on the configuration of the user’s system, the use of system proxy features on certain platforms may be subject to limitations. The systemProxyForQuery() documentation contains a list of these limitations for those platforms that are affected.

Methods

__init__()

TODO


__init__(QNetworkProxyFactory)

TODO


@staticmethod
proxyForQuery(QNetworkProxyQuery) → List[QNetworkProxy]

TODO


queryProxy(query: QNetworkProxyQuery = QNetworkProxyQuery()) → List[QNetworkProxy]

TODO


@staticmethod
setApplicationProxyFactory(QNetworkProxyFactory)

TODO


@staticmethod
setUseSystemConfiguration(bool)

TODO


@staticmethod
systemProxyForQuery(query: QNetworkProxyQuery = QNetworkProxyQuery()) → List[QNetworkProxy]

TODO


@staticmethod
usesSystemConfiguration() → bool

TODO