To set up a proxy on macOS, open System Settings > Network, select your active connection (Wi-Fi or Ethernet), click Details > Proxies, then enable the protocol you need (Web Proxy for HTTP, Secure Web Proxy for HTTPS, or SOCKS Proxy), enter the server address and port, and click OK. Your entire system will then route traffic through the proxy. For per-application control, set environment variables in Terminal or use a SOCKS5 client.
This guide covers every method that works on macOS Sonoma (14), Sequoia (15), and Ventura (13): system-wide network proxy, per-app environment variables, browser-specific configuration for Safari/Chrome/Firefox, command-line tools like curl and wget, SOCKS5 setup, authentication, verification, and troubleshooting.
A proxy server routes your network traffic through an intermediate IP address before reaching the destination. On macOS specifically, configuring a proxy gives you several advantages:
This is the easiest method. It applies to all apps that respect macOS proxy settings — including Safari, Chrome, Edge, the App Store, and most native applications. Firefox uses its own proxy settings by default and must be configured separately (see Method 3).
gate.spyderproxy.com) and Port (e.g., 8080).Your entire system — including Safari, Mail, the App Store, and most third-party apps — now routes traffic through the proxy.
The path is nearly identical, but the System Settings pane has slightly different labels:
Some addresses (like localhost, internal company URLs, or banking sites) should not use the proxy. Add them to Bypass proxy settings for these Hosts & Domains. Separate entries with commas:
localhost, 127.0.0.1, *.local, *.internal.example.com, banking.example.com
If you only want certain Terminal commands or scripts to use a proxy — not your whole system — set environment variables. This is the cleanest approach for developers running Python, Node.js, or shell-based scrapers.
Most macOS users run zsh by default. Open Terminal and add these lines to ~/.zshrc (or ~/.bash_profile if you use bash):
export http_proxy="http://username:[email protected]:8080"
export https_proxy="http://username:[email protected]:8080"
export HTTP_PROXY="$http_proxy"
export HTTPS_PROXY="$https_proxy"
export NO_PROXY="localhost,127.0.0.1,*.local"
Reload your shell with source ~/.zshrc. Most Unix tools (curl, wget, git, pip, npm) automatically respect these variables.
To use the proxy for a single command without changing your shell config:
http_proxy="http://user:[email protected]:8080" https_proxy="http://user:[email protected]:8080" curl https://ifconfig.me
Safari uses macOS system proxy settings. Configure it via System Settings > Network > Proxies as in Method 1. There is no Safari-specific proxy panel.
Chrome on Mac also uses system proxy settings. Open Chrome > Settings > System > Open your computer's proxy settings. This jumps to the macOS Network panel.
For per-tab or per-window proxies, install Proxy SwitchyOmega from the Chrome Web Store. It lets you store multiple proxy profiles and switch with one click without touching system settings.
Firefox is the only major browser on macOS with its own proxy settings, independent of the OS:
curl --proxy http://user:[email protected]:8080 https://ifconfig.me
For a SOCKS5 proxy:
curl --socks5 user:[email protected]:1080 https://ifconfig.me
wget -e use_proxy=yes -e http_proxy=http://user:[email protected]:8080 https://example.com/file.zip
git config --global http.proxy http://user:[email protected]:8080
git config --global https.proxy http://user:[email protected]:8080
To remove later: git config --global --unset http.proxy.
pip install --proxy http://user:[email protected]:8080 requests
Or persist it in ~/.pip/pip.conf:
[global]
proxy = http://user:[email protected]:8080
npm config set proxy http://user:[email protected]:8080
npm config set https-proxy http://user:[email protected]:8080
SOCKS5 supports any protocol (HTTP, HTTPS, FTP, SMTP, BitTorrent) and offers better performance for non-web traffic. To configure SOCKS5 system-wide:
gate.spyderproxy.com) and port (commonly 1080).For per-app SOCKS5, use tsocks (install via Homebrew: brew install tsocks), then prefix any command with tsocks to route only that process through SOCKS5.
Open Terminal and run:
curl https://ifconfig.me
The IP address returned should be your proxy's IP, not your home/office IP. Cross-check with a browser visit to spyderproxy.com/tools/ip-lookup — it should show the same proxy IP and the proxy's geolocation (city, country, ISP).
To check for DNS leaks, visit spyderproxy.com/tools/dns-leak-test and run an extended test. All DNS queries should resolve through the proxy's network, not your local ISP.
Most premium proxy providers offer two authentication methods:
For Mac users who travel, username/password is more reliable. For static-IP office setups, whitelisting is faster.
curl -v --proxy http://user:pass@host:port https://ifconfig.me shows the connection attempt with full headers.If your real ISP appears in the DNS leak test while connected to a proxy, your DNS queries are bypassing the tunnel. Fixes:
1.1.1.1 and 8.8.8.8.Apps written with custom networking stacks (Java, Go, certain Electron apps) sometimes ignore macOS system proxies. Set environment variables in their launch script, or configure the proxy inside the app.
For most users, a residential rotating proxy works well: it gives you a fresh IP from a real consumer ISP every few minutes, perfect for managing accounts, scraping, or unblocking content. Datacenter proxies are best for raw speed and developer testing. Mobile proxies (4G/5G) are the most expensive but the hardest for sites to detect because they share IPs with thousands of legitimate mobile users.
Setting up a proxy on macOS is straightforward whether you need it system-wide for everyday browsing or per-app for development and scraping. The built-in Network Proxies pane covers Safari, Chrome, and most native apps; environment variables and tools like tsocks handle the developer use cases; and Firefox can be configured independently. Once your proxy is configured, always verify with curl ifconfig.me and a DNS leak test before doing anything sensitive.