Sök i support

Akta dig för supportbedrägerier: Vi kommer aldrig att be dig att ringa eller skicka ett sms till ett telefonnummer eller dela personlig information. Rapportera misstänkt aktivitet med alternativet "Rapportera missbruk".

Läs mer

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

  • 1 svar
  • 2 har detta problem
  • 1 visning
  • Senaste svar av 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

Ändrad av leonc

Alla svar (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.