Skip to content

How to Set Up a Proxy on a Mac

macOS proxy settings step by step: Web, Secure web or SOCKS proxy, the login, the bypass list, who follows it, and Terminal: variables and networksetup.

HProxy TeamAugust 7, 2026Updated October 3, 202611 min read

How to Set Up a Proxy on a Mac

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 itWhat it reachesWhat it leaves out
System Settings: Network, Details, ProxiesSafari, Chrome, Firefox (by default) and apps on Apple's networking, on that network serviceTerminal tools, apps with their own network code, other network services
Terminal: http_proxy and https_proxycurl, Homebrew and the other tools you run in that shellSafari, Chrome and every other app
Firefox: its own Network SettingsFirefox, once you switch it away from the system proxyEverything else
Chrome started with --proxy-serverThat ChromeEverything else
Who follows the Mac's proxy

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

Source: Chromium: proxy_config_service_mac.cc; Firefox: StaticPrefList.yaml; the curl and Homebrew manuals; Ask Different question 333672 · hproxy.comProxy.

Before you start: what you need

One proxy line, four parts

203.0.113.10Host:8080Port:hp_ir4k2Username:9fa2c1Password
  • 203.0.113.10:8080:hp_ir4k2:9fa2c1host:port:user:passMost proxy tools and checkers
  • hp_ir4k2:9fa2c1@203.0.113.10:8080user:pass@host:portcurl, requests, most HTTP clients
  • http://hp_ir4k2:9fa2c1@203.0.113.10:8080http://user:pass@host:portAnything taking a full proxy URL

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.
Captured on 2 October 2026 at hproxy.com/free-proxy-list/http. The address and port of a row are the server and port the steps below ask for.

Step 1: open Proxies

  1. Choose Apple menu > System Settings and click Network in the sidebar.
  2. Click the network service you use, such as Wi-Fi.
  3. 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:

  1. Turn on Web proxy (HTTP) (1) and enter the server and port (2).
  2. If the proxy needs a login, turn on Proxy server requires password (3) and enter the user name and password.
  3. Turn on Secure web proxy (HTTPS) (4) and give it the same server, port and login.
  4. Optionally, list addresses that should skip the proxy (5).
  5. Click OK (6).
The Mac's Proxies screen for one network service
System SettingsmacOS

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
OKCancel
Source: Drawn from Apple's Mac User Guide for macOS 27, not a screenshot. · hproxy.comProxy.

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:

(1) The secure web proxy is a setting of its own, apart from the web proxy. (2) So is the SOCKS proxy. (3) The bypass list and the simple-hostnames switch. (4) Chrome asks the Mac for its proxy settings. (5) Firefox's default is 5, use the system proxy.

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 seeWhat it meansFix
http:// pages show the proxy's address, https:// pages your ownOnly 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_FAILEDNothing 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 addressTerminal reads environment variables, not System Settings.Set http_proxy and https_proxy in ~/.zshrc.
Homebrew ignores the proxyOnly 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 itA 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 MacFirefox was switched away from the system proxy.In its Network Settings, choose Use system proxy settings.
Works on Wi-Fi, not with a cableThe 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

  • "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 for http:// 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 networksetup and scutil manuals (ss64.com copies of Apple's man pages).
  • Chromium: proxy_config_service_mac.cc and proxy_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.

Frequently asked questions

Where is the proxy setting on a Mac?

On macOS 13 and later: Apple menu, System Settings, Network, click the network service you use (Wi-Fi, for example), Details, then Proxies. On macOS 12 and older it was System Preferences, Network, Advanced, Proxies.

Which proxies do I turn on for an ordinary HTTP proxy?

Both Web proxy (HTTP) and Secure web proxy (HTTPS), with the same server and port. The Mac keeps them as two separate settings, and with only the first one on, every https:// address skips the proxy.

Is the Secure web proxy (HTTPS) an encrypted proxy?

No. It is the proxy the Mac uses for https:// addresses, and it is an ordinary HTTP proxy. Chrome's source code says so in a comment: the HTTPS on the Mac side means the proxy applies to https:// addresses, the proxy itself is still expected to be an HTTP proxy.

Do I have to click Apply?

Not on macOS 13 and later: Apple's steps end with OK, and there is no Apply button on that screen. Guides that say OK, then Apply describe the System Preferences window of macOS 12 and older.

Does Firefox use the Mac's proxy?

Yes, unless someone changed it. Firefox's own source sets network.proxy.type to 5 by default, which means use the system proxy settings. Several guides say Firefox ignores the Mac's proxy; that only holds after you pick another option in Firefox's Network Settings.

Why does Terminal ignore the proxy?

Because curl, Homebrew and other command-line tools take their proxy from environment variables, not from System Settings. Put export http_proxy and export https_proxy lines in ~/.zshrc, the file zsh, the Mac's default shell, reads for every new Terminal window.

How do I set the Mac's proxy from Terminal?

With networksetup: networksetup -setwebproxy "Wi-Fi" 203.0.113.10 8080 and networksetup -setsecurewebproxy "Wi-Fi" 203.0.113.10 8080 turn both web proxies on for the Wi-Fi service. networksetup -setwebproxystate "Wi-Fi" off switches one off again, and scutil --proxy shows what is in effect.

Where do I enter the proxy username and password on a Mac?

Under each proxy you turn on: switch on Proxy server requires password, then fill in the user name and password. Give the Web proxy and the Secure web proxy the same login.

How do I keep some sites off the proxy on a Mac?

In 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. Exclude simple hostnames also keeps names without a dot, like https://server, off the proxy.

Can I use a SOCKS5 proxy on a Mac?

Yes. Turn on SOCKS proxy on its own and enter the server and port. Chrome treats the Mac's SOCKS proxy as SOCKS5, and in Chrome's code it is the fallback, so leave the two web proxies off or they take the web traffic.

Does the proxy apply to Wi-Fi and Ethernet at once?

No. The setting belongs to one network service, the one you clicked before Details. Set it for Ethernet, or any other service you use, separately.

How do I turn the proxy off on a Mac?

System Settings, Network, your network service, Details, Proxies, switch each proxy off, OK. In Terminal: networksetup -setwebproxystate "Wi-Fi" off and networksetup -setsecurewebproxystate "Wi-Fi" off, and unset http_proxy https_proxy for the variables.

Proxies that don't die mid-job

Residential, ISP, datacenter and mobile, verified by the same engine that runs tens of millions of checks. They read as a real device and hold up under load. Pay as you go, and your balance never expires. $0.44/GB is the 2,000 GB+ rate; a single gigabyte is $0.50/GB, with no minimum order.

129M+ proxy checks run · 100+ countries · HTTP / HTTPS / SOCKS · re-checked every few minutes · no signup

HProxy.

Honest guides and comparisons on proxies, scraping and staying unblocked, from the team that runs the network.

RSS feed