Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

chrome.proxy API for Firefox WebExtensions

Does Firefox WebExtensions support an API to change proxy preferences (like the chrome.proxy API)?

Does Mozilla have plans to add it?

like image 223
Aakash Gupta Avatar asked Jan 06 '23 04:01

Aakash Gupta


2 Answers

Yes. Starting from 55th Firefox it will be possible. https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/proxy

Keep in mind, this API absolutely different from Chrome version.

For code split use typeof browser === 'undefined'

like image 99
Rustam Avatar answered Jan 18 '23 23:01

Rustam


Firefox 60+

As of Firefox 60, Firefox and Firefox for Android support the proxy API, which is available through browser.proxy. It is roughly similar to the chrome.proxy API on Chrome.

Firefox 56-71

There was what should now be considered a false-start of Firefox supporting a different semantic for setting the proxy using browser.proxy.register() and browser.proxy.unregister(). They were first introduced in Firefox 56, depricated in Firefox 68 and will be removed after either Firefox 70 or 71 (depending on which documentation is to be believed).

Earlier versions of Firefox

WebExtensions does not yet support the chrome.proxy API. There are plans to support it in the future (as there are plans for basically all of the Chrome extension APIs).

There are two related tracking bugs:

  • Bug 1295807 - [tracking] Support proxy configuration from WebExtensions
  • Bug 1283639 - [tracking] Proxy API support for WebExtensions

There is a thread about "WebExtension Proxy API Design" on the Dev-addons mailing list.

For now, If you want to manipulate proxy settings from a Firefox add-on, you will need to use some other type of add-on.

like image 28
Makyen Avatar answered Jan 19 '23 01:01

Makyen