Join the Mozilla’s Test Days event from Dec 2–8 to test the new Firefox address bar on Firefox Beta 134 and get a chance to win Mozilla swag vouchers! 🎁

Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

How can I set a different proxy server for different networks in user.js

  • 1 Antwort
  • 2 haben dieses Problem
  • 1 Aufruf
  • Letzte Antwort von cor-el

more options

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

Geändert am von leonc

Alle Antworten (1)

more options

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.