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.
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.
Values of this type are objects. They contain the following properties:
typestring. 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. Use proxy.settings to check whether a manual proxy is being used and, if necessary, monitor those settings for changes using BrowserSetting.onChange."http": HTTP proxy (or SSL CONNECT for HTTPS)"https": HTTP proxying over TLS connection to proxy"socks": SOCKS v5 proxy"socks4": SOCKS v4 proxyhoststring. The hostname of the proxy server. Mandatory unless type is "direct".
portnumber. The port number of the proxy server. Mandatory unless type is "direct".
usernamestring. Username for the proxy service. This is usable with "socks". For HTTP proxy authorizations, use webRequest.onAuthRequired.
passwordstring. Password for the proxy service. This is usable with "socks". For HTTP proxy authorizations, use webRequest.onAuthRequired.
proxyDNSboolean. If true, the proxy server is used to resolve certain DNS queries (only usable with "socks4" and "socks"). Defaults to false.
failoverTimeoutnumber. 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 the proxy.onRequest listener will be used.
string. This string, if set to non-empty, is passed directly as a value to the Proxy-Authorization request header sent to HTTPS proxies as part of HTTPS and CONNECT requests. In other words, this can be used to directly authenticate to HTTPS proxies that allow (non-challenging) authentication.
For instance, if you want to send "username" and "password" for "basic" authentication, you can set the proxyAuthorizationHeader property to Basic dXNlcm5hbWU6cGFzc3dvcmQ=
connectionIsolationKey Optional
string. An optional key used for additional isolation of this proxy connection. Applies to HTTPS proxies only.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
ProxyInfo |
No | No | 60 | ? | No | No | ? | ? | 60 | ? | No | ? |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/proxy/ProxyInfo