proxy API

Hint

The proxy API is inherited from Firefox, and its primary documentation is maintained by Mozilla at MDN. Thunderbird implements only the subset of functions, events, and types listed here. The MDN pages may provide further details and examples, but they may also reference features that are not supported in Thunderbird.

Provides access to global proxy settings for Thunderbird and proxy event listeners to handle dynamic proxy implementations.

Permissions

The following permissions influence the behavior of the API. Depending on which permissions are requested, additional methods might be available, or certain data may be included in responses.

Hint

Request permissions only when needed. Unnecessary requests may result in rejection during ATN review.

proxy

proxy

Control browser proxy settings.

Note

The permission proxy is required to use messenger.proxy.*.

Events

onError

Notifies about errors caused by the invalid use of the proxy API.

Parameters for onError.addListener(listener)

listener(error)

listener(error)

A function that will be called when this event occurs.

Parameters passed to the listener function

error

error

(object)

Required permissions

  • proxy

onRequest

– [Added in TB 147]

Fired when proxy data is needed for a request.

Note

Before version 78, the tabId and windowId filter properties are ignored.

Parameters for onRequest.addListener(listener, filter, extraInfoSpec)

listener(details)

listener(details)

A function that will be called when this event occurs.

filter

filter

A set of filters that restricts the events that will be sent to this listener.

extraInfoSpec

[extraInfoSpec]

(array of string, optional)

Array of extra information that should be passed to the listener function.

Supported values:

requestHeaders

Parameters passed to the listener function

details

details

(object)

frameId

frameId

(integer)

The value 0 indicates that the request happens in the main frame; a positive value indicates the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (type is main_frame or sub_frame), frameId indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab.

fromCache

fromCache

(boolean)

Indicates if this response was fetched from disk cache.

method

method

(string)

Standard HTTP method.

parentFrameId

parentFrameId

(integer)

ID of frame that wraps the frame which sent the request. Set to -1 if no parent frame exists.

requestId

requestId

(string)

The ID of the request. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request.

tabId

tabId

(integer)

The ID of the tab in which the request takes place. Set to -1 if the request isn’t related to a tab.

thirdParty

thirdParty

(boolean)

Indicates if this request and its content window hierarchy is third party.

timeStamp

timeStamp

(number)

The time when this signal is triggered, in milliseconds since the epoch.

type

type

How the requested resource will be used.

url

url

(string)

urlClassification

urlClassification

Url classification if the request has been classified.

cookieStoreId

[cookieStoreId]

(string, optional)

The cookie store ID of the contextual identity.

documentUrl

[documentUrl]

(string, optional)

URL of the page into which the requested resource will be loaded.

incognito

[incognito]

(boolean, optional)

True for private browsing requests.

originUrl

[originUrl]

(string, optional)

URL of the resource that triggered this request.

requestHeaders

[requestHeaders]

(HttpHeaders, optional)

The HTTP request headers that are going to be sent out with this request.

Required permissions

  • proxy

Types

ProxyConfig

An object which describes proxy settings.

object

autoConfigUrl

[autoConfigUrl]

(string, optional)

A URL to use to configure the proxy.

autoLogin

[autoLogin]

(boolean, optional)

Do not prompt for authentication if password is saved.

ftp

[ftp]

(string, optional) Deprecated.

The address of the ftp proxy, can include a port. Deprecated since Thunderbird 88.

http

[http]

(string, optional)

The address of the http proxy, can include a port.

httpProxyAll

[httpProxyAll]

(boolean, optional)

Use the http proxy server for all protocols.

passthrough

[passthrough]

(string, optional)

A list of hosts which should not be proxied.

proxyDNS

[proxyDNS]

(boolean, optional)

Proxy DNS when using SOCKS. DNS queries get leaked to the network when set to false. True by default for SOCKS v5. False by default for SOCKS v4.

proxyType

[proxyType]

(string, optional)

The type of proxy to use.

Supported values:

autoConfig

autoConfig

autoDetect

autoDetect

manual

manual

none

none

system

system

respectBeConservative

[respectBeConservative]

(boolean, optional)

If true (the default value), do not use newer TLS protocol features that might have interoperability problems on the Internet. This is intended only for use with critical infrastructure like the updates, and is only available to privileged addons.

socks

[socks]

(string, optional)

The address of the socks proxy, can include a port.

socksVersion

[socksVersion]

(integer, optional)

The version of the socks proxy.

ssl

[ssl]

(string, optional)

The address of the ssl proxy, can include a port.

Properties

settings

Configures proxy settings. This setting’s value is an object of type ProxyConfig.

Note

Not supported in Thunderbird because it depends on private browsing functionality, which Thunderbird does not fully implement.

Note

From version 88, the ftp setting has no effect because FTP is no longer supported (see bug 1626365).