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
Control browser proxy settings.
Events
onError
Notifies about errors caused by the invalid use of the proxy API.
Parameters for onError.addListener(listener)
listener(error)
A function that will be called when this event occurs.
Required permissions
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)
A function that will be called when this event occurs.
filter
A set of filters that restricts the events that will be sent to this listener.
extraInfoSpec
Array of extra information that should be passed to the listener function.
Supported values:
requestHeaders
Parameters passed to the listener function
details
frameId
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
Indicates if this response was fetched from disk cache.
method
Standard HTTP method.
parentFrameId
ID of frame that wraps the frame which sent the request. Set to -1 if no parent frame exists.
requestId
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
The ID of the tab in which the request takes place. Set to -1 if the request isn’t related to a tab.
thirdParty
Indicates if this request and its content window hierarchy is third party.
timeStamp
The time when this signal is triggered, in milliseconds since the epoch.
type
How the requested resource will be used.
url
urlClassification
Url classification if the request has been classified.
cookieStoreId
The cookie store ID of the contextual identity.
documentUrl
URL of the page into which the requested resource will be loaded.
incognito
True for private browsing requests.
originUrl
URL of the resource that triggered this request.
requestHeaders
The HTTP request headers that are going to be sent out with this request.
Required permissions
Types
ProxyConfig
An object which describes proxy settings.
object
autoConfigUrl
A URL to use to configure the proxy.
autoLogin
Do not prompt for authentication if password is saved.
ftp
The address of the ftp proxy, can include a port. Deprecated since Thunderbird 88.
http
The address of the http proxy, can include a port.
httpProxyAll
Use the http proxy server for all protocols.
passthrough
A list of hosts which should not be proxied.
proxyDNS
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
respectBeConservative
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
The address of the socks proxy, can include a port.
socksVersion
The version of the socks proxy.
ssl
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).