tom
tom

Reputation: 115

Is there any way to easily change proxy in macOS without going to System preferences > Network > advanced > proxy > etc

I daily need to switch proxies in macOS and going every time to System Preferences > Network > advanced > proxies > enable HTTP proxy and secure web proxy, is really frustrating.

Is there any way or app that acts similar(on macos) to foxyproxy in browsers?

Thanks in advance

Upvotes: 4

Views: 1940

Answers (2)

Noah Tran
Noah Tran

Reputation: 3594

It's possible by executing the following CLI

$ networksetup -setwebproxy "Wi-Fi" 127.0.0.1 9090 && networksetup -setsecurewebproxy "Wi-Fi" 127.0.0.1 9090

Assume that 127.0.0.1 and 9090 is the IP and port you need to Proxy

You can disable HTTP Proxy by

$ networksetup -setwebproxystate "Wi-Fi" off && networksetup -setsecurewebproxystate "Wi-Fi" off

Upvotes: 2

Jarek
Jarek

Reputation: 930

I think the most macOS way is to use Locations:

  1. Go to System Preferences > Network,
  2. Select "Location" dropdown menu,
  3. Select "Edit Locations",

enter image description here

  1. Choose Duplicate location and make a copy from your default Automatic:

enter image description here

Select a name corresponding to your Proxy name.

  1. Switch to new location and edit the proxy under Advanced

enter image description here

  1. Once all Locations are added, feel free to use them from 🍎 menu:

enter image description here

Upvotes: 7

Related Questions