docs.rodeo

MDN Web Docs mirror

proxy.settings

{{AddonSidebar}} 

A {{WebExtAPIRef("types.BrowserSetting", "BrowserSetting")}}  object used to change the browser’s proxy settings.

[!NOTE] Changing proxy settings requires private browsing window access because proxy settings affect private and non-private windows. Whether an extension can access private browsing windows is under user control. See Extensions in Private Browsing for details. Your extension can check whether it has access to private browsing windows using {{WebExtAPIRef("extension.isAllowedIncognitoAccess")}} . If your extension doesn’t have private window permission, calls to proxy.settings.set() throw an exception.

The underlying value is an object. When setting this object, all properties are optional. Any omitted properties are reset to their default value.

Examples

let proxySettings = {
  proxyType: "manual",
  http: "http://proxy.org:8080",
  socksVersion: 4,
  passthrough: ".example.org",
};

browser.proxy.settings.set({ value: proxySettings });

{{WebExtExamples}} 

Browser compatibility

{{Compat}} 

In this article

View on MDN