spyderproxy
BackBack to Blog

How to Set Up a Proxy on macOS (2026 Guide)

DateApr 16, 2026
By Alex R.11 min read

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.

Why Use a Proxy on Mac?

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:

  • Privacy — Mask your real IP from websites, ad networks, and trackers.
  • Geo-unblocking — Access region-locked streaming, news sites, or app stores by routing through residential IPs in another country.
  • Web scraping & data collection — Run Python, Node.js, or Puppeteer scripts through rotating proxies to avoid rate limits.
  • Multi-account management — Each browser profile or app can use a different IP for managing social media or e-commerce accounts safely.
  • Corporate compliance — Many enterprises require Mac users to route traffic through an authenticated proxy for monitoring and DLP.
  • Speed testing — Compare performance from different geographic regions without traveling.

Method 1: System-Wide Proxy in macOS System Settings

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).

macOS Sonoma (14) and Sequoia (15)

  1. Click the Apple menu in the top-left corner and select System Settings.
  2. In the sidebar, click Network.
  3. Select your active connection — usually Wi-Fi or Ethernet.
  4. Click the Details… button next to the connected network name.
  5. In the side menu of the popup, click Proxies.
  6. Toggle on the proxy protocol you want to use:
    • Web Proxy (HTTP) — for plain HTTP traffic on port 80.
    • Secure Web Proxy (HTTPS) — for encrypted HTTPS traffic on port 443.
    • SOCKS Proxy — for protocol-agnostic tunneling (recommended for general use).
  7. Enter the Server address (e.g., gate.spyderproxy.com) and Port (e.g., 8080).
  8. If your provider requires credentials, check Proxy server requires password and enter your username and password.
  9. Click OK, then Apply.

Your entire system — including Safari, Mail, the App Store, and most third-party apps — now routes traffic through the proxy.

macOS Ventura (13)

The path is nearly identical, but the System Settings pane has slightly different labels:

  1. Open System Preferences from the Apple menu.
  2. Click Network.
  3. Select your interface (Wi-Fi or Ethernet) and click Advanced.
  4. Switch to the Proxies tab.
  5. Choose the protocol(s) on the left and fill in server, port, and credentials.
  6. Click OK, then Apply.

Adding a Bypass List

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

Method 2: Per-Application Proxy with Environment Variables

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.

Setting Variables in Your Shell

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.

One-Shot Prefix (No Config Edit Needed)

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

Method 3: Browser-Specific Proxy Settings

Safari

Safari uses macOS system proxy settings. Configure it via System Settings > Network > Proxies as in Method 1. There is no Safari-specific proxy panel.

Google Chrome

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.

Mozilla Firefox

Firefox is the only major browser on macOS with its own proxy settings, independent of the OS:

  1. Open Firefox > Settings.
  2. Scroll to the bottom of the General tab.
  3. Click Settings… next to Network Settings.
  4. Choose Manual proxy configuration.
  5. Enter your HTTP, HTTPS, and SOCKS host/port. To route DNS through the proxy (recommended), enable Proxy DNS when using SOCKS v5.
  6. Click OK.

Method 4: Command-Line Tools (curl, wget, git, pip, npm)

curl with --proxy Flag

curl --proxy http://user:[email protected]:8080 https://ifconfig.me

For a SOCKS5 proxy:

curl --socks5 user:[email protected]:1080 https://ifconfig.me

wget

wget -e use_proxy=yes -e http_proxy=http://user:[email protected]:8080 https://example.com/file.zip

git

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 (Python)

pip install --proxy http://user:[email protected]:8080 requests

Or persist it in ~/.pip/pip.conf:

[global]
proxy = http://user:[email protected]:8080

npm (Node.js)

npm config set proxy http://user:[email protected]:8080
npm config set https-proxy http://user:[email protected]:8080

Setting Up a SOCKS5 Proxy on macOS

SOCKS5 supports any protocol (HTTP, HTTPS, FTP, SMTP, BitTorrent) and offers better performance for non-web traffic. To configure SOCKS5 system-wide:

  1. Open System Settings > Network > Wi-Fi (or Ethernet) > Details > Proxies.
  2. Toggle on SOCKS Proxy.
  3. Enter the server (e.g., gate.spyderproxy.com) and port (commonly 1080).
  4. Add credentials if required.
  5. Click OK, then Apply.

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.

Verifying Your Proxy Is Working

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.

Authentication: Username/Password vs IP Whitelist

Most premium proxy providers offer two authentication methods:

  • Username and password — you enter credentials in the proxy config. Works from anywhere, including on the road.
  • IP whitelist — you authorize your home/office public IP in the provider dashboard, no credentials needed in the config. More convenient but breaks if your IP changes (cellular, hotel Wi-Fi, etc.).

For Mac users who travel, username/password is more reliable. For static-IP office setups, whitelisting is faster.

Troubleshooting Common macOS Proxy Issues

Proxy Not Connecting

  • Verify the proxy server, port, username, and password are correct — one wrong character will silently fail.
  • Test from Terminal: curl -v --proxy http://user:pass@host:port https://ifconfig.me shows the connection attempt with full headers.
  • If you see HTTP 407 Proxy Authentication Required, your credentials are wrong or the proxy expects a different auth method.
  • If you see connection refused, the server is offline or your IP is not whitelisted.

Slow Speeds

  • Choose a proxy server geographically close to you for lower latency.
  • Datacenter proxies are typically fastest; residential proxies trade speed for legitimacy.
  • Disable IPv6 if your proxy only supports IPv4: System Settings > Network > Wi-Fi > Details > TCP/IP > Configure IPv6: Link-local only.

DNS Leaks

If your real ISP appears in the DNS leak test while connected to a proxy, your DNS queries are bypassing the tunnel. Fixes:

  • Use SOCKS5 with Proxy DNS when using SOCKS v5 enabled (Firefox supports this directly).
  • Manually set custom DNS in System Settings > Network > Wi-Fi > Details > DNS — e.g., 1.1.1.1 and 8.8.8.8.

Some Apps Ignore the System Proxy

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.

When You Need a Mac Proxy

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.

Conclusion

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.

Need Reliable Proxies for Your Mac?

SpyderProxy's HTTP(S) and SOCKS5 proxies work seamlessly with macOS Sonoma, Sequoia, and Ventura. Unlimited bandwidth, instant activation, and US/EU/Asia coverage.