How can I set a different proxy server for different networks in user.js
I need to automatically set the proxy configuration depending on the network I am connected to. Can this be done through the user.js?
Simple logic would be:-
if IP=10.20.30.0 use proxy A if IP=172.18.19.0 use proxy B else DIRECT
Thanks
Leon
I need to automatically set the proxy configuration depending on the network I am connected to. Can this be done through the user.js?
Simple logic would be:-
if IP=10.20.30.0 use proxy A
if IP=172.18.19.0 use proxy B
else DIRECT
Thanks
Leon
Modified
All Replies (1)
No, you can't do it that way.
You could create a set of files user.js and use a bat or cmd file to copy the file with the proxy setting that you want to use to user.js and then start Firefox.
cd <path to profile folder> delete user.js copy user-proxy1.js user.js start "" "C:\Program Files\Mozilla Firefox\firefox.exe"
You can also use an extension.
- FoxyProxy: https://addons.mozilla.org/firefox/addon/2464
- QuickProxy: https://addons.mozilla.org/firefox/addon/1557
- SwitchProxy: https://addons.mozilla.org/firefox/addon/125