Browser with proxy

proxy.registerProxyScript()
How to Browse Anonymously With Tor

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 .

Syntax

var registering = browser.proxy.registerProxyScript( url // string )

Parameters

url 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.

Return value

A that will be fulfilled with no arguments when the PAC file has been registered, or rejected if there was an error.

Browser compatibility

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.

Examples

const proxyScriptURL = "proxy/proxy-script.js"; browser.proxy.registerProxyScript(proxyScriptURL).then;

Source: developer.mozilla.org


Related posts:

  1. Edit Browser proxy
  2. Browser with Built in proxy
  3. Web Browser with proxy
  4. Bypass server proxy