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. 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
  • "masque": MASQUE proxy (tunnel over QUIC as defined in RFC 9298)
  • "socks": SOCKS v5 proxy
  • "socks4": SOCKS v4 proxy
host

string. The hostname of the proxy server. Mandatory unless type is "direct".

port

number. The port number of the proxy server. Mandatory unless type is "direct".

masqueTemplate

string. The URI template for the MASQUE proxy, starting from the path component of the URI. This must contain the target_host and target_port template variables as defined in RFC 9298. For example, /.well-known/masque/udp/{target_host}/{target_port}/. Must be set when the proxy type is "masque".

username Optional

string. Username for the proxy service. This is usable with "socks". For HTTP proxy authorizations, use webRequest.onAuthRequired. Must not be set when proxy is "masque".

password Optional

string. Password for the proxy service. This is usable with "socks". For HTTP proxy authorizations, use webRequest.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 to false.

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 the proxy.onRequest listener will be used.

proxyAuthorizationHeader

string. When set, this is passed to the Proxy-Authorization request 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 proxyAuthorizationHeader property to Basic dXNlcm5hbWU6cGFzc3dvcmQ=

connectionIsolationKey Optional

string. An optional key used for additional isolation of this proxy connection.

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
ProxyInfo
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 60 (Release date: 2018-05-09)
footnote Full support
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 60 (Release date: 2018-05-09)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
masqueTemplate
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 146 (Release date: 2025-12-09)
footnote
footnote Was available as pathTemplate in Firefox 145.
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 146 (Release date: 2025-12-09)
footnote
footnote Was available as pathTemplate in Firefox for Android 145.
Safari on iOS – No support
Safari on iOS
footnote No support
proxyAuthorizationHeader
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 60 (Release date: 2018-05-09)
footnote
footnote Support for HTTP proxies (in addition to HTTPS proxies) added in Firefox 125.
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 60 (Release date: 2018-05-09)
footnote
footnote Support for HTTP proxies (in addition to HTTPS proxies) added in Firefox for Android 125.
Safari on iOS – No support
Safari on iOS
footnote No support
type
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 60 (Release date: 2018-05-09)
footnote
footnote Support for the "masque" type was added in Firefox 145.
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 60 (Release date: 2018-05-09)
footnote
footnote Support for the "masque" type was added in Firefox for Android 145.
Safari on iOS – No support
Safari on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.