I switch from one proxy to another very frequently and needs to change my proxy settings of my browser very frequently. I am attempting to write a script file that changes pr开发者_如何学Pythonoxy of firefox according to that value that i pass to the script. I went through the posts in stackoverflow but nothing seems to be very relevant to what i need.
I have a script in /etc/NetworkManager/dispatcher.d/
which determines which proxy to use for the current connections and then calls:
gconf --type string --set /system/proxy/mode "manual"
gconf --type bool --set /system/http_proxy/use_http_proxy "true"
gconf --type string --set /system/http_proxy/host $PROXY_HOST
gconf --type int --set /system/http_proxy/port $PROXY_PORT
gconf --type bool --set /system/http_proxy/use_same_proxy "true"
gconf --type bool --set /system/http_proxy/use_authentication $AUTH_REQUIRED
gconf --type string --set /system/http_proxy/authentication_user $DOMAIN_USER
gconf --type string --set /system/http_proxy/authentication_password $DOMAIN_PWD
- Why not you set firefox to use System Proxy setting.
- Write script to change the proxy setting in your profile.
精彩评论