Use proxy only on one network

Ryan Schmidt ryandesign at macports.org
Tue Aug 19 17:16:13 PDT 2014


I'm experimenting with running a proxy server on my network, which I would like MacPorts to use while on that network, while not interfering with my ability to use MacPorts while connected to other networks. What's the best way to do this in an automated way? Editing macports.conf proxy settings every time I switch networks is cumbersome. Similarly manually setting and unsetting environment variables. I'm currently thinking of wrapping the "port" command in a shell function (which I already do) and using the IP address or AirPort network name to determine whether I'm on the home network and setting the environment variables accordingly. I'm also dimly aware of OS X's network locations feature, but way back when those were introduced I remember you had to manually select which location you wanted to use.




More information about the macports-users mailing list