macOS handles the proxy differently from Windows: the setting is bound not system-wide, but to the network interface . The proxy you define for Wi-Fi goes inactive when you switch to Ethernet. This is as useful as it is confusing — scenarios such as a proxy at the office and a direct connection at home need no extra tools.
Interface-Based Logic
If an application is not behaving the way you expect, working out which layer it reads solves half the problem.
Step by Step from System Settings
Apple menu → System Settings → Network → select the interface you are connected to → Details… → Proxies. A list of protocols appears:
- Web Proxy (HTTP) — unencrypted web traffic.
- Secure Web Proxy (HTTPS) — the CONNECT tunnel; you need to fill in both.
- SOCKS Proxy — the strong side of macOS: SOCKS5 is supported natively.
- Automatic Proxy Configuration — the PAC file address.
For addresses that require a username/password, tick the "Proxy server requires password" box and enter the credentials; macOS stores them in Keychain, so it does not ask again at every startup. This is a clear advantage over Windows.
Quick Management from the Terminal
The service name must be typed exactly — "Wi-Fi" is not the same as "WiFi". The commands may ask for an administrator password.
Dynamic SOCKS5 over SSH
If you have SSH access to a server, you can bring up your own SOCKS5 proxy without installing any extra software: ssh -D 1080 -q -C -N kullanici@sunucu. Then all you need to enter in the macOS SOCKS field is 127.0.0.1:1080 . Traffic exits through the SSH tunnel; encryption is provided by SSH. In situations where you want a single long-lived exit IP, this method comes close to how ISP proxy behaves.
Application-Specific Exceptions
| Application | Does it use the system proxy? | Note |
|---|---|---|
| Safari | Yes | Inherits the interface setting directly |
| Chrome | Yes | --proxy-server flag can override it |
| Firefox | No (by default) | It has its own settings screen |
| curl / git | No | Looks at the environment variables |
| Homebrew | Partially | ALL_PROXY variable is read |
One-Click Switching with Network Locations
The little-known "Location" feature of macOS stores all network settings — including the proxy — as named profiles. System Settings → Network → the three dots at the top right → Locations → Edit Locations. If you create two profiles named "Office" and "Home" and assign a proxy to one of them, you can switch between them with two clicks from the Apple menu.
Switching profiles renews the DHCP lease and applies the proxy setting instantly; you do not need to restart applications.
Switching from the command line is also possible: networksetup -switchtolocation "Ofis". By binding this command to a shortcut, you can reduce turning the proxy on and off to a single step.
Verification
In the terminal, the curl -s https://api.ipify.org command shows the environment variables, while in the browser the My IP Address page shows the interface setting. If the two results differ, one of the layers is missing. To make sure that DNS queries also go through the tunnel, run the DNS leak test — when using SOCKS5, the "remote DNS" option is critically important.