Tutorials 4 min read

macOS Proxy Settings: System Settings, networksetup and Terminal (2026)

macOS stores proxy settings per network service, supports credentials, and can be scripted. Terminal is the part that doesn't follow along.

macOS proxy settings are more capable than Windows': you can store a username and password, set separate HTTP, HTTPS and SOCKS proxies, and script the whole thing with one command. The settings belong to a network service such as Wi-Fi or Ethernet, so switching from Wi-Fi to a cable silently drops the proxy. And Terminal tools ignore all of it unless you set environment variables.

Setting a Proxy in System Settings

  1. Open System Settings and click Network.
  2. Click Wi-Fi (or Ethernet, whichever you use), then Details... next to the connected network.
  3. Choose Proxies in the sidebar.
  4. Turn on Web proxy (HTTP). Server: global.nodeproxies.xyz, Port: 8080.
  5. Turn on "Proxy server requires password" and enter your proxy username and password.
  6. Turn on Secure web proxy (HTTPS) and enter the same server, port and credentials.
  7. Under "Bypass proxy settings for these hosts & domains", keep localhost, 127.0.0.1 and *.local.
  8. Click OK.

Safari, Chrome, Edge and most apps that use Apple's networking frameworks now go through the proxy, and the credentials are stored in your keychain, so you won't be prompted every time.

Web Proxy, Secure Web Proxy and SOCKS Proxy

  • Web proxy (HTTP): used for plain http:// URLs.
  • Secure web proxy (HTTPS): used for https:// URLs. It's still an HTTP proxy at global.nodeproxies.xyz:8080; HTTPS traffic is tunnelled through it with CONNECT, so it stays encrypted.
  • SOCKS proxy: a lower-level proxy some apps prefer. If you set it, use port 1080.

Set both Web and Secure web proxy. If you only set one, half your traffic goes direct, and sites see two different IPs. SOCKS5 vs HTTP proxies explains when SOCKS helps.

Scripting It with networksetup

If you switch proxies often, the networksetup command does everything from Terminal. First list your network services:

networksetup -listallnetworkservices

Then set the HTTP and HTTPS proxy with authentication for the Wi-Fi service. The arguments are service, host, port, authenticated (on/off), username, password:

networksetup -setwebproxy "Wi-Fi" global.nodeproxies.xyz 8080 on 'USERNAME-country-us-session-mac1-time-60' 'PASSWORD'
networksetup -setsecurewebproxy "Wi-Fi" global.nodeproxies.xyz 8080 on 'USERNAME-country-us-session-mac1-time-60' 'PASSWORD'
networksetup -setproxybypassdomains "Wi-Fi" localhost 127.0.0.1 '*.local'

Check and turn it off again with:

networksetup -getwebproxy "Wi-Fi"
networksetup -setwebproxystate "Wi-Fi" off
networksetup -setsecurewebproxystate "Wi-Fi" off

Changing settings may ask for an administrator password. Wrap the on and off commands in two shell aliases and switching takes one word.

Choosing the Right Username

With a system-wide proxy, lots of apps make requests at once. If each request rotates to a new IP, you'll get logged out of sites and see extra security checks. A sticky session, like mac1 above with time-60, keeps one IP for an hour. Change the session id when you want a new IP, and change the country code to browse from elsewhere; the residential proxies page lists countries.

Making Terminal Use the Proxy

curl, Python, Node.js, Homebrew and Git don't read System Settings. They read environment variables. Add these to ~/.zshrc for every new terminal, or run them in one session:

export http_proxy='http://USERNAME:[email protected]:8080'
export https_proxy="$http_proxy"
export HTTP_PROXY="$http_proxy"
export HTTPS_PROXY="$http_proxy"
export no_proxy='localhost,127.0.0.1'

Setting both lowercase and uppercase covers tools that only check one. Some tools also have their own settings; see git, npm and pip behind a proxy. For a broader view of what follows the system proxy and what doesn't, read system-wide proxy on Windows and Mac.

Troubleshooting

  • Proxy stops working when you dock your laptop: you're now on Ethernet or a USB adapter, a different network service. Set the proxy there too.
  • Repeated password prompts: the keychain entry is wrong or stale. Re-enter credentials in the Proxies panel.
  • Safari works but an app doesn't: the app uses its own networking. Check its settings for a proxy option.
  • Everything fails after a plan runs out: the proxy returns 402. Turn the proxy off or top up.

Confirm the change with our what is my IP tool.

Saving Bandwidth with Bypass Domains

A system proxy carries everything, including iCloud sync, App Store downloads and OS updates. On a per-GB plan that's wasted money. Add Apple's domains to the bypass list so they go direct:

networksetup -setproxybypassdomains "Wi-Fi" localhost 127.0.0.1 '*.local' '*.apple.com' '*.icloud.com'

The command replaces the whole list, so include every entry each time. Add any other heavy services you don't need proxied, such as your video calling or cloud storage domains.

Using NodeProxies on macOS

Use global.nodeproxies.xyz:8080 for both Web and Secure web proxy, with your dashboard username and password. System-wide use includes background traffic like updates and cloud sync, so watch your usage, or consider the unlimited residential plan for heavy days. Register or compare plans on pricing.

FAQ

Where are proxy settings on a Mac?

System Settings, Network, your connection, Details..., then Proxies. Each network service has its own settings.

Can I save a proxy password on macOS?

Yes. Turn on "Proxy server requires password" and macOS stores the credentials in your keychain.

Why doesn't Terminal use my Mac proxy settings?

Command-line tools read http_proxy and https_proxy environment variables rather than System Settings. Export them in your shell profile.

How do I turn off the proxy on Mac quickly?

Run networksetup -setwebproxystate "Wi-Fi" off and the same for -setsecurewebproxystate, or untick both proxies in System Settings.

NodeProxies

Ready to get started?

90M+ residential, mobile & datacenter proxies. Datacenter from $0.30/GB, residential from $0.42/GB. No contracts.

Create free account