Use proxy only on one network

Daniel J. Luke dluke at geeklair.net
Wed Aug 20 06:46:11 PDT 2014


On Aug 19, 2014, at 8:16 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
> 
> 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.

You could set up transparent proxying on your home network (plus - all traffic you want to go through your proxy will for all hosts on your network, minus - everything runs through the proxy, and you may not want that).

--
Daniel J. Luke                                                                   
+========================================================+                        
| *---------------- dluke at geeklair.net ----------------* |                          
| *-------------- http://www.geeklair.net -------------* |                          
+========================================================+                        
|   Opinions expressed are mine and do not necessarily   |                          
|          reflect the opinions of my employer.          |                          
+========================================================+





More information about the macports-users mailing list