搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

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

  • 1 个回答
  • 2 人有此问题
  • 8 次查看
  • 最后回复者为 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

由leonc于修改

所有回复 (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.