I use SwitchySharp to quick switch between multi-proxies under Chrome broswer.

Now I want to move to Safari(I love its "Tap to Zoom" feature), but SwitchySharp only works in Chrome, there is no a counterpart in Safari extension.

So I wonder if there is a system level quick proxy switcher script or free app?

3 Answers 3


Have you tried using the Locations feature?

  1. Go to System Preferences > Network,
  2. Click on the "Location" dropdown menu,
  3. Choose "Edit Locations",
  4. Click on the add button and give the location a name. I would suggest you give it a name that's related to the proxy,
  5. Now that you've setup a new location, go through the networking configuration, ensuring you set the relevant proxy setting under the "Proxies" tab, which can be found under the Ethernet/WiFi adapter settings > Advanced.

Repeat steps 1-5 for each proxy.

Once you've finished, you can quickly switch between each proxy by clicking on the Apple icon (located at the top left of your screen) and going to "Location". Once the Location menu expands, you should see all your different locations, which have the relevant proxy settings within them. Clicking on the locations will change the proxy settings your Mac uses.

  • 3
    possible to automatically switch location based on the currently available WiFi network?
    – ryenus
    Mar 18, 2015 at 3:29
  • if it be possible to define shortcut for it it will be excellent
    – ali
    Mar 24, 2018 at 10:50
  • Also works through istat menus network widget
    – kirqe
    Apr 21, 2021 at 13:55

Apple Script Solution

Copy the code into the file ~/Library/Scripts/proxytoggle.applescript

set socksStatus to do shell script "networksetup -getsocksfirewallproxy Wi-fi | grep Enabled"

if (offset of "Yes" in socksStatus) = 0 then
    do shell script "networksetup -setsocksfirewallproxystate Wi-fi On"
    display notification "Proxy Enabled !"
    do shell script "networksetup -setsocksfirewallproxystate Wi-fi Off"
    display notification "Socks disabled"
end if

Then in Script Editor.app under Preferences tab I enabled Show Script menu in menubar checkbox (annotated in red):

enter image description here

as you can see, when you run the code it enable the proxy and if you run it again it will be disable.

Have a great day !


There's ControlPlane that can take certain actions upon selected context change events, e.g. context change event can be getting connected to a specified WiFi network (per SSID), and action can be switching locations, hence uses location specific proxies.

For alternative apps suitable for macOS 13+, see https://github.com/dustinrue/ControlPlane/issues/518#issue-1635500278


You must log in to answer this question.

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