proxy.ProxyInfo
Contains information about a proxy. This object, or an array of these objects, is returned from the listener to proxy.onRequest. It instructs the browser whether to proxy the request, and if so, which proxy to use.
Type
Values of this type are objects. They contain the following properties:
type-
string. This describes whether to proxy at all, and if so, what kind of proxy to use. It may take one of the following values:"direct": don't proxy the request. If this value is given, all other properties of this object are ignored. However, this setting doesn't override any proxy set by the user. Useproxy.settingsto check whether a manual proxy is being used and, if necessary, monitor those settings for changes usingBrowserSetting.onChange."http": HTTP proxy (or SSL CONNECT for HTTPS)"https": HTTP proxying over TLS connection to proxy"masque": MASQUE (Multiplexed Application Substrate over QUIC Encryption) proxy"socks": SOCKS v5 proxy"socks4": SOCKS v4 proxy
host-
string. The hostname of the proxy server. Mandatory unlesstypeis"direct". port-
number. The port number of the proxy server. Mandatory unlesstypeis"direct". pathTemplate-
string. The path template. Must be set when the proxy type is"masque", otherwise it's ignored. usernameOptional-
string. Username for the proxy service. This is usable with "socks". For HTTP proxy authorizations, usewebRequest.onAuthRequired. Must not be set when proxy is"masque". passwordOptional-
string. Password for the proxy service. This is usable with "socks". For HTTP proxy authorizations, usewebRequest.onAuthRequired. Must not be set when proxy is"masque". proxyDNS-
boolean. If true, the proxy server is used to resolve certain DNS queries (only usable with"socks4"and"socks"). Defaults tofalse. failoverTimeout-
number. Failover timeout in seconds. If the connection fails to connect the proxy server after this number of seconds, the next proxy server in the array returned from theproxy.onRequestlistener will be used. -
string. When set, this is passed to theProxy-Authorizationrequest header sent to HTTP or HTTPS proxies as part of a CONNECT request. Used to authenticate to HTTP and HTTPS proxies that allow non-challenging authentication.For instance, if you want to send "username" and "password" for "basic" authentication, you can set the
proxyAuthorizationHeaderproperty toBasic dXNlcm5hbWU6cGFzc3dvcmQ= connectionIsolationKeyOptional-
string. An optional key used for additional isolation of this proxy connection.
Browser compatibility
Loading…