Most of us are working in corporate environments and corporate environments do love proxies. And I hate them;
- I hate setting them every morning
- I hate un-setting them every evening
I am assuming that you also use the same laptop at work and at home.
Since I am so sick of changing proxy settings every time, I created the following bash script to set and unset proxy settings.
You can run it as follows. In order to unset all the proxy settings, just run it without parameters.
Now you can set and unset your GNOME proxy settings with one simple command.
If you prefer, you don’t even have to run it at all –by yourself I mean :)– Just create another script under /etc/network/if-up.d and with the following contents. Now every time your computer connects to a network it will call the first script ‘change_proxy.sh’ with appropriate parameters depending on the your IP address.
*UPDATE: The script above also puts proper my maven
settings.xml and also enables/disables proxy for subversion according to the environment. You can add more stuff to this script, if you have more settings that you need to change.*