Tool
tool
Reads:
2178
Score:
license:
FreeI got fed up of having to switch proxy settings on and off between sites, so I wrote this little script to help me!
There are a few configuration steps to go through first:
- Go into Control Center and set Network Proxy to use the system proxy settings.
- Go into Yast and set your proxy settings to on.
- cp /etc/sysconfig/proxy /etc/sysconfig/proxy.on
- Go into Yast and set your proxy settings to off.
- cp /etc/sysconfig/proxy /etc/sysconfig/proxy.off
- Set Firefox to use system settings for proxy
- Put this script somewhere and make it executable:
#!/bin/bash # Replace the IP address below with the address of your proxy server. ping 172.16.1.1 -c 1 -s 32 if [ $? = 0 ] then # If I can ping my proxy server then use it! sudo cp /etc/sysconfig/proxy.on /etc/sysconfig/proxy else # If I can't ping my proxy server then switch off! sudo cp /etc/sysconfig/proxy.off /etc/sysconfig/proxy fi
- Call this script at startup - I execute it from my .profile script.
NB: you will need to add the executing user your SUDOers list to run without a password for this script to work - you could alternatively change the permissions on the /etc/sysconfig/proxy file to avoid this.
Related Articles
User Comments
Foxyproxy
Submitted by supermathie on 16 July 2008 - 10:26am.
If you need any sort of proxy management or fine-grained control, check out FoxyProxy for Firefox. It also makes it dead simple to toggle between proxies.
Granted, it's not systemwide, but also makes things rather easy to control.







1