I have a script as shown below and I need a solution.
Scenario :
I am using development tools such as Android Package Manager, nodeJS (npm), Homebrew, etc. Daily. I need to use it at home and at work, but at work I am behind a proxy server, so I had to configure a proxy server on every single tool, for example.
npm config set proxy http:
But when I work at home, I don’t need it, because the proxy does not provide the fastest bandwidth in the world :) I would say it is rather slow, and I do not want to spend my time downloading packages 10 times slower.
Question :
Is there any solution for two different profiles? Or do I need to write a bash script to change the proxy settings every time I change my location (work / home)?
Please let me know if this is possible, or if you have experience with a familiar script.
Thank!
source
share