Browser with proxy
Registers a Proxy Auto-Configuration (PAC) file. The file is executed immediately, and its FindProxyForURL function will be called for any HTTP, HTTPS, or FTP requests.
If PAC files are registered by more than one add-on, then requests will be passed initially to the one that was registered first.
- If the FindProxyForURL function in the first PAC returns "DIRECT" for a request, then the request will be passed unchanged to the FindProxyForURL function in the next PAC.
- If the FindProxyForURL function in the first PAC proxies the request by returning "PROXY" or some other proxying value, then the proxy URL will be passed to the FindProxyForURL function in the next PAC.
This is an asynchronous function that returns a .
var registering = browser.proxy.registerProxyScript( url // string )
Parametersurl String. URL pointing to the PAC file to load. PAC files must be bundled with the add-on, and url must be relative to the add-on's manifest.json file.
A that will be fulfilled with no arguments when the PAC file has been registered, or rejected if there was an error.
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out and send us a pull request.
const proxyScriptURL = "proxy/proxy-script.js"; browser.proxy.registerProxyScript(proxyScriptURL).then;