On a Mac the proxy lives in System Settings, inside one network service such as Wi-Fi, and three things trip people up. An ordinary HTTP proxy needs two switches, not one. Terminal ignores the setting altogether. And the steps that end with "OK, then Apply" describe a window that macOS 13 replaced.
We wrote this from Apple's Mac User Guide for macOS 27, Apple's open-source network code, Chrome's and Firefox's source, and the curl and Homebrew manuals, plus the questions Mac users ask on Ask Different. We did not use a Mac for this page, so the screen below is drawn from Apple's guide rather than captured.
| Where you set it | What it reaches | What it leaves out |
|---|---|---|
| System Settings: Network, Details, Proxies | Safari, Chrome, Firefox (by default) and apps on Apple's networking, on that network service | Terminal tools, apps with their own network code, other network services |
Terminal: http_proxy and https_proxy | curl, Homebrew and the other tools you run in that shell | Safari, Chrome and every other app |
| Firefox: its own Network Settings | Firefox, once you switch it away from the system proxy | Everything else |
Chrome started with --proxy-server | That Chrome | Everything else |
Follow it
Safari and the App Store
Apple's own networking
Chrome
its Mac code reads the system proxy
Firefox
its default is 5: use the system proxy
Left out
Terminal: curl, Homebrew
they read environment variables
Apps with their own network code
only if their makers built them to follow it
Other network services
Ethernet keeps its own setting
Before you start: what you need
One proxy line, four parts
203.0.113.10Host:8080Port:hp_ir4k2Username:9fa2c1Password203.0.113.10:8080:hp_ir4k2:9fa2c1hp_ir4k2:9fa2c1@203.0.113.10:8080http://hp_ir4k2:9fa2c1@203.0.113.10:8080
System Settings takes the host as the server and the port separately; the user name and password go under Proxy server requires password. Values shown are examples.
- A proxy address as
host:port, plus a user name and password if the proxy needs a login. If your provider sent one long line, the proxy format guide splits it up. - Which network service you use: Wi-Fi on most Macs, Ethernet with a cable.
- For a first test, any HTTP entry from our free proxy list will do. Free entries come and go, so test one first; the check further down shows how.
- Our free proxy setup generator writes every value below for your own proxy, the Proxies screen, the networksetup lines and the Terminal variables, with the password written the way each one reads it.
Step 1: open Proxies
- Choose Apple menu > System Settings and click Network in the sidebar.
- Click the network service you use, such as Wi-Fi.
- Click Details, then Proxies. You may need to scroll down.
That is Apple's own path in the Mac User Guide for macOS 27. On macOS 12 and older the same settings sat in System Preferences > Network > Advanced > Proxies, a window that ended with OK and Apply.
Step 2: turn on both web proxies
For an ordinary HTTP proxy, which is what most providers and free lists give you:
- Turn on Web proxy (HTTP) (1) and enter the server and port (2).
- If the proxy needs a login, turn on Proxy server requires password (3) and enter the user name and password.
- Turn on Secure web proxy (HTTPS) (4) and give it the same server, port and login.
- Optionally, list addresses that should skip the proxy (5).
- Click OK (6).
NetworkWi-FiDetailsProxies
Proxies
- Web proxy (HTTP)On
- Server203.0.113.10Port8080
- Proxy server requires passwordOn
- User namehp_ir4k2Password••••••
- Secure web proxy (HTTPS)OnThe same server, port and login as the web proxy.
- SOCKS proxyOff
- Exclude simple hostnamesOn
- Bypass proxy settings for these hosts & domains*.local, intranet.example.com
The server goes in on its own, with no http:// in front, and the port in its own box. Why two switches for one proxy: the Mac stores the web proxy, the secure web proxy and the SOCKS proxy as three separate settings, each with its own on switch, server and port. With only Web proxy (HTTP) on, every https:// address, which today is nearly every site, goes straight out.
We read those settings from Apple's open-source network code, and checked who reads them:
The Secure web proxy is not an encrypted proxy
The name suggests a proxy you reach over an encrypted connection. It is not. Chrome's source code puts it plainly, where it reads the Mac's setting: "The 'HTTPS' on the Mac side here means 'proxy applies to https://' URLs; the proxy itself is still expected to be an HTTP proxy." A Mac user who built their own secure web proxy saw the same from the other side, on Ask Different: the Mac sent it plain HTTP requests. So the same ordinary HTTP proxy goes into both boxes, and the HTTPS traffic still stays encrypted from your Mac to the site, inside the proxy's tunnel.
Which apps follow it
Safari and the App Store use it; on Ask Different, a user whose Terminal ignored the proxy found both going through it fine. Chrome does too: its Mac code asks the system for the proxy settings, including the secure web proxy, the SOCKS proxy and the bypass list. Firefox follows it by default: in Firefox's source, network.proxy.type starts at 5, which the file names PROXYCONFIG_SYSTEM, the system proxy. Firefox only goes its own way after someone picks another option in its Network Settings.
What does not follow it: Terminal tools (next section) and apps with network code of their own, unless their makers built them to read the Mac's proxy.
Terminal: the proxy variables
Terminal does not read System Settings. curl, Homebrew and the other command-line tools take their proxy from environment variables. curl's manual sets the rules: lower-case names win, http_proxy exists only in lower case, https_proxy covers https:// addresses and no_proxy lists what skips the proxy. Add the lines to ~/.zshrc, the file zsh, the Mac's default shell, reads for every new Terminal window:
export http_proxy="http://hp_ir4k2:9fa2c1@203.0.113.10:8080"
export https_proxy="$http_proxy"
export no_proxy="localhost,127.0.0.1,.local"
Open a new Terminal window, or run source ~/.zshrc, and the tools started from it use the proxy. Set both names: Homebrew's own manual tells you to set these variables, but its example shows only http_proxy, and curl sends https:// downloads through https_proxy. The file stores the password in plain text, so leave the login out of the line if your provider can allow your address instead.
Setting the Mac's proxy from Terminal
Apple's networksetup command changes the same settings as System Settings, one network service at a time:
networksetup -listallnetworkservices
networksetup -setwebproxy "Wi-Fi" 203.0.113.10 8080
networksetup -setsecurewebproxy "Wi-Fi" 203.0.113.10 8080
networksetup -setproxybypassdomains "Wi-Fi" "*.local" "intranet.example.com"
scutil --proxy
The first line lists the service names to use. -setwebproxy and -setsecurewebproxy turn the two web proxies on; their manual adds optional on, a user name and a password for a proxy with a login, which would then sit in your shell history, so turning on Proxy server requires password in System Settings is the tidier way. -setsocksfirewallproxy does the same for SOCKS. scutil --proxy reports the proxy configuration in effect. To switch them off again:
networksetup -setwebproxystate "Wi-Fi" off
networksetup -setsecurewebproxystate "Wi-Fi" off
A SOCKS5 proxy
The Mac has a SOCKS proxy of its own: turn on SOCKS proxy, enter the server and port, and the login if it needs one. Chrome treats it as SOCKS5, the only version its code says the Mac supports. Turn it on alone: in Chrome's code the SOCKS proxy is the fallback, used for addresses no web proxy covers, so with the two web proxies also on, the web traffic goes to them instead.
Keeping some addresses off the proxy
Type them into Bypass proxy settings for these hosts & domains, separated by commas. Apple's examples: apple.com for one domain, *apple.com for every site on it, store.apple.com for one part of it. Exclude simple hostnames keeps names without a dot, such as https://server, off the proxy. In Terminal the same job falls to no_proxy.
For a company network there are two automatic options. Automatic proxy configuration takes the address of a PAC file. Auto proxy discovery looks for one itself; Apple's deployment guide describes how a managed Mac finds it, a wpad.dat file through DHCP (option 252) or DNS (a host named WPAD).
Check that it worked
Open this address in Safari:
https://www.cloudflare.com/cdn-cgi/trace
The line starting with ip= is the address sites see; if it is the proxy's address, Safari goes through the proxy. In Terminal, the same check runs through the variables:
curl -s https://www.cloudflare.com/cdn-cgi/trace | grep ip=
Then open https://hproxy.com/api/ip/ followed by that address: it names the country, city and network behind it. Before you put a proxy into the Mac at all, paste it into our free proxy checker, which reports whether it answers, its protocols, anonymity, country and latency.
When it does not work
Mac proxy problems, what they mean, and the fix
| What you see | What it means | Fix |
|---|---|---|
| http:// pages show the proxy's address, https:// pages your own | Only Web proxy (HTTP) is on. | Turn on Secure web proxy (HTTPS) with the same server and port. |
Chrome: There is something wrong with the proxy server, or the address is incorrect. with ERR_PROXY_CONNECTION_FAILED | Nothing answers at the proxy's address and port. | Switch the proxies off, test the proxy, then set it again. |
| Safari goes through the proxy, Terminal shows your own address | Terminal reads environment variables, not System Settings. | Set http_proxy and https_proxy in ~/.zshrc. |
| Homebrew ignores the proxy | Only http_proxy is set, and curl sends https:// downloads through https_proxy. | Set https_proxy too. |
| A SOCKS proxy is on, but web traffic does not use it | A web proxy is also on and takes the web traffic. | Turn the web proxies off and leave SOCKS on alone. |
| Firefox does not follow the Mac | Firefox was switched away from the system proxy. | In its Network Settings, choose Use system proxy settings. |
| Works on Wi-Fi, not with a cable | The setting belongs to one network service. | Set the proxy for Ethernet too. |
Apple's Mac User Guide for macOS 27; Chromium's Mac proxy code and error texts; the curl and Homebrew manuals; Ask Different questions 333672 and 226544
Mistakes other guides make
- "Firefox ignores the Mac's proxy." Its default is 5, use the system proxy.
- "Click OK, then Apply." Apple's steps on macOS 13 and later end with OK.
- "The secure web proxy is an encrypted proxy", or turning it on alone. It is the HTTP proxy for
https://addresses, and it needs the web proxy beside it forhttp://ones. - "The settings apply to all apps without exception." Terminal ignores them.
Turning it off again
System Settings > Network, your network service, Details, Proxies: switch each proxy off and click OK. In Terminal, the two networksetup ... off lines above do the same, and unset http_proxy https_proxy clears the variables in the open window; remove the lines from ~/.zshrc so new windows start without them. A dead proxy on a Mac looks like a Mac on Wi-Fi that cannot load anything.
About free proxies
Free entries come and go, so test one before you rely on it, and switch the proxies off when you are done. For daily use, a paid proxy can keep one address for a sticky session.
How we wrote this
We read Apple's Mac User Guide for macOS 27 (Change proxy settings on Mac; Enter proxy server settings on Mac) and Apple's deployment guide on 3 October 2026, along with Apple's open-source configd, the networksetup and scutil manuals, Chromium's Mac proxy code, Firefox's preference list, and the curl and Homebrew manuals. The questions come from Ask Different. The terminal picture is our own read of configd, Chromium and Firefox.
Limits: we did not use a Mac, so the Proxies screen is drawn from Apple's guide. Which other apps follow the proxy is not tested app by app, and Safari's own error texts on macOS 27 were not checked.
Sources
All read on 3 October 2026.
- Apple Mac User Guide for macOS 27: Change proxy settings on Mac; Enter proxy server settings on Mac (support.apple.com).
- Apple Platform Deployment: Network Proxy Configuration settings (support.apple.com/guide/deployment).
- Apple configd, open source:
SCSchemaDefinitions.h(github.com/apple-oss-distributions/configd). - The
networksetupandscutilmanuals (ss64.com copies of Apple's man pages). - Chromium:
proxy_config_service_mac.ccandproxy_chain_util_apple.cc(chromium.googlesource.com). - Firefox:
StaticPrefList.yaml(github.com/mozilla-firefox/firefox). - curl manual, Environment (curl.se); Homebrew manual, Using Homebrew behind a proxy (docs.brew.sh).
- Ask Different questions 226544, 333672, 244711 and 479964.
- Our read of configd, Chromium and Firefox with curl, 3 October 2026.



