selenium.webdriver.common.proxy#

The Proxy implementation.

Classes

Proxy([raw])

Proxy configuration containing proxy type and necessary proxy settings.

ProxyType()

Set of possible types of proxy.

ProxyTypeFactory()

Factory for proxy types.

class ProxyTypeFactory[source]#

Bases: object

Factory for proxy types.

static make(ff_value, string)[source]#
class ProxyType[source]#

Bases: object

Set of possible types of proxy.

Each proxy type has 2 properties: ‘ff_value’ is value of Firefox profile preference, ‘string’ is id of proxy type.

DIRECT = {'ff_value': 0, 'string': 'DIRECT'}#
MANUAL = {'ff_value': 1, 'string': 'MANUAL'}#
PAC = {'ff_value': 2, 'string': 'PAC'}#
RESERVED_1 = {'ff_value': 3, 'string': 'RESERVED1'}#
AUTODETECT = {'ff_value': 4, 'string': 'AUTODETECT'}#
SYSTEM = {'ff_value': 5, 'string': 'SYSTEM'}#
UNSPECIFIED = {'ff_value': 6, 'string': 'UNSPECIFIED'}#
classmethod load(value)[source]#
class Proxy(raw=None)[source]#

Bases: object

Proxy configuration containing proxy type and necessary proxy settings.

Creates a new Proxy.

Parameters:

raw (dict | None) – Raw proxy data. If None, default class values are used.

proxyType = {'ff_value': 6, 'string': 'UNSPECIFIED'}#
autodetect = False#
httpProxy = ''#
noProxy = ''#
proxyAutoconfigUrl = ''#
socksProxy = ''#
socksUsername = ''#
socksPassword = ''#
socksVersion = None#
ssl_proxy#

SSL proxy address.

http_proxy#

HTTP proxy address.

no_proxy#

Addresses to bypass proxy.

proxy_autoconfig_url#

Proxy autoconfiguration URL.

sslProxy = ''#
auto_detect#

Proxy autodetection setting (boolean).

socks_proxy#

SOCKS proxy address.

socks_username#

SOCKS proxy username.

socks_password#

SOCKS proxy password.

socks_version#

SOCKS proxy version.

property proxy_type#

Returns proxy type as ProxyType.

to_capabilities()[source]#
to_bidi_dict()[source]#

Convert proxy settings to BiDi format.

Returns:

Proxy configuration in BiDi format.

Return type:

dict