All locations active · 99.99% uptime
Setup

macOS Proxy Settings

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

FIGUREThe macOS proxy stack
LAYERIn-app settingFirefox, Telegram and terminal tools can use their own settingtopmostNetwork interface (Wi-Fi / Ethernet)System Settings → Network → Proxies tab — most applications look heredefaultEnvironment variablesHTTP_PROXY / HTTPS_PROXY — terminal session onlyshellRouting / VPN layerutun interfaces work independently of the proxybottom

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 SettingsNetwork → 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

FIGURETurning the proxy on, turning it off and reading it with commands
Terminal — networksetup01# List the current services (to find out the exact name)02networksetup -listallnetworkservices0304# Define the HTTP and HTTPS proxy05networksetup -setwebproxy "Wi-Fi" 185.93.68.14 808006networksetup -setsecurewebproxy "Wi-Fi" 185.93.68.14 80800708# Define SOCKS509networksetup -setsocksfirewallproxy "Wi-Fi" 10.0.0.5 10801011# Turn it off and check the status12networksetup -setwebproxystate "Wi-Fi" off13networksetup -getwebproxy "Wi-Fi"

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

ApplicationDoes it use the system proxy?Note
SafariYesInherits the interface setting directly
ChromeYes--proxy-server flag can override it
FirefoxNo (by default)It has its own settings screen
curl / gitNoLooks at the environment variables
HomebrewPartiallyALL_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.

FIGUREA daily flow with location profiles
PROFILE09:00Office location — corporate proxyon12:30Mobile hotspot — directconnection14:00Office location — automaticreturn19:00Home location — SOCKS5 onlytest address

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.

Frequently Asked Questions

01Does the macOS proxy setting work together with a VPN?

It works, but the order matters: once the VPN connection is established, proxy traffic exits through the VPN tunnel. This can double the latency; to measure it, use ping test tool .

02I set it on Wi-Fi, it does not work on Ethernet

That is expected behavior. On macOS the proxy is tied to the interface; you have to configure it separately for each interface.

03It asks for the password at every startup

Tick the "Proxy server requires password" box and save the credentials; allow Keychain access.

Related Articles and Pages

NEXT STEP

Strengthen your proxy setup today.

Get started in minutes with a paid plan, or try our free proxy list first.

FREEPROXY.TR

Looking for a free proxy? You're in the right place

A complete proxy platform where you can browse up-to-date free proxy addresses, compare HTTP and SOCKS proxy types, and check your proxy connections with free tools.