8

A network I connect to requires configuring proxy settings to reach the Internet.

When I configure those settings within the Automatic location, it applies to every network I connect to.

Is there a way to apply those settings only to this specific network so when I connect to it those proxy settings work and when I connect to another network they do not?

3
  • 1
    Yes I did. However, your answer below worked fine. I was just expecting a way to do it without switching locations or anything. I thought there might be something I can do to make the proxy settings run whenever I connect to the intended network. Jan 19, 2016 at 18:42
  • There might be a way for you to achieve this once you have built and tested the required network configurations. Look at ControlPlane, and if you find a satisfying solution, post here a more appropriate answer :).
    – dan
    Jan 19, 2016 at 22:42
  • I removed your hardware and MacOS X indications, since your question is relevant for more than 6 different versions of MacOS X.
    – dan
    Jan 19, 2016 at 22:48

2 Answers 2

16

You need to make specific network configuration:

System Preferences > Network > Location: > Edit Locations...

left down + button, enter a new netowrk configuration name, for example Office / Wi-Fi + proxy, choose it and configure it with the proxy setting you need.

You will have to make 2 network configurations one to go through your proxy, and one without. Example: Office / Ethernet + proxy, Home / Wi-fi - proxy.

You will notice that you have a new menu entry:

 > Location

and you will be able to choose the correct network configuration which fits your actual network use.

To avoid most of the problems caused by the Automatic predefined network configuration, I advise you to inactivate completly network interfaces you don't use. For example Bluetooth doesn't have to be configured and open to network access if you don't use it yourself, and you don't control who uses it.

0
1

I know this answer is probably too late for the OP, but I'm posting this for the benefit of all people who still have this issue (like I did).

The original question was how to automatically change proxy settings depending on the network that you're connected to. Surprisingly, there is no native solution for this.

After trying basically everything, I stumbled across this github page from Anton Eprev, who has a relatively easy solution to this.

  • First, follow the instructions in @dan's answer and create a separate network location with your proxy settings. You must name this location the same exact name as the SSID of the network that you plan to use with these settings. You can make as many separate locations for as many proxy setups as you require.

  • Second, paste and run the following into terminal to install the script from github. (You'll have to enter your admin password.)

curl -L https://github.com/eprev/locationchanger/raw/master/locationchanger.sh | bash

And that's it! The program will automatically set the network location to match the SSID of the Wi-Fi you're connected to, and default to 'Automatic' if you're on anything else. Enjoy!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .