v1.8.91-d84675c
← Back to Hex Proxies

Safari Proxy Setup

Last updated: April 2026

By Hex Proxies Engineering Team

Safari uses macOS system proxy settings. Learn how to configure HTTP, HTTPS, and SOCKS proxies for Safari through System Settings and integrate with Hex Proxies.

beginner8 minutesbrowser-setup

Prerequisites

  • macOS device with Safari
  • Hex Proxies account with active plan
  • Administrator access on your Mac

Steps

1

Open System Settings

Click the Apple menu → System Settings (or System Preferences on older macOS versions).

2

Navigate to Network settings

Click Network in the sidebar, then select your active connection (Wi-Fi or Ethernet).

3

Open proxy configuration

Click "Details..." next to your active connection, then select the "Proxies" tab.

4

Enable Web Proxy (HTTP)

Check "Web Proxy (HTTP)". Enter gate.hexproxies.com as the server and 8080 as the port. Enter your Hex Proxies username and password.

5

Enable Secure Web Proxy (HTTPS)

Check "Secure Web Proxy (HTTPS)". Enter the same server, port, and credentials as the HTTP proxy.

6

Configure SOCKS proxy (optional)

For SOCKS5, check "SOCKS Proxy" and enter gate.hexproxies.com with port 1080 and your credentials.

7

Save and verify

Click OK, then Apply. Open Safari and visit https://httpbin.org/ip to confirm traffic routes through the proxy.

How Safari Handles Proxy Settings

Safari on macOS does not have its own proxy configuration — it relies entirely on macOS System Settings. Any proxy you configure at the system level applies to Safari and all other applications that respect system proxy settings (including most Mac apps, Spotlight web searches, and App Store connections).

This means configuring a proxy for Safari also affects Chrome, mail clients, and other apps. If you need proxy isolation, consider using Firefox (which has independent settings) or a PAC file to limit which traffic routes through the proxy.

Configuring HTTP and HTTPS Proxies

macOS Ventura and Later (System Settings)

  1. Open **System Settings** from the Apple menu
  2. Click **Network** in the sidebar
  3. Select your active connection — **Wi-Fi** or **Ethernet**
  4. Click **Details...**
  5. Select the **Proxies** tab

Under the proxy list, you will see these protocol options:

☐ Auto Proxy Discovery
☐ Automatic Proxy Configuration
☐ Web Proxy (HTTP)
☐ Secure Web Proxy (HTTPS)
☐ SOCKS Proxy
☐ Streaming Proxy (RTSP)
☐ Gopher Proxy

Setting Up Web Proxy (HTTP)

  1. Check **Web Proxy (HTTP)**
  2. Enter the following:
Server: gate.hexproxies.com
Port: 8080
Username: YOUR_HEX_USERNAME
Password: YOUR_HEX_PASSWORD

3. Click **OK**

Setting Up Secure Web Proxy (HTTPS)

  1. Check **Secure Web Proxy (HTTPS)**
  2. Enter the same credentials:
Server: gate.hexproxies.com
Port: 8080
Username: YOUR_HEX_USERNAME
Password: YOUR_HEX_PASSWORD

3. Click **OK** → **Apply**

You must configure both HTTP and HTTPS proxies to cover all web traffic. HTTPS-only sites (which is most of the modern web) will bypass the proxy if you only set the HTTP proxy.

macOS Monterey and Earlier (System Preferences)

  1. Open **System Preferences** → **Network**
  2. Select your active connection from the left sidebar
  3. Click **Advanced...** → **Proxies** tab
  4. Follow the same steps as above

SOCKS Proxy Configuration

SOCKS proxies route all TCP traffic (and optionally UDP) through the proxy, not just HTTP. This provides broader coverage and better anonymity.

  1. In the Proxies tab, check **SOCKS Proxy**
  2. Enter:
Server: gate.hexproxies.com
Port: 1080
Username: YOUR_HEX_USERNAME
Password: YOUR_HEX_PASSWORD

3. Click **OK** → **Apply**

When using SOCKS proxy, you can leave HTTP and HTTPS proxy unchecked — SOCKS handles all traffic types.

DNS Leak Warning

macOS SOCKS proxy settings do not automatically route DNS queries through the proxy. DNS requests may still go through your ISP, revealing which domains you visit. To mitigate this:

  • Use a DNS-over-HTTPS (DoH) provider configured in System Settings → Network → DNS
  • Or configure a custom DNS server that routes through the proxy
  • Firefox with SOCKS5 and "Proxy DNS" checked is the most leak-proof option on macOS

PAC File Configuration

PAC (Proxy Auto-Configuration) files allow dynamic proxy routing based on URLs and domains. Safari fully supports PAC files.

Creating a PAC File

Create a file named `proxy.pac`:

function FindProxyForURL(url, host) {
  // Local addresses bypass proxy
  if (isInNet(host, "192.168.0.0", "255.255.0.0") ||
      isInNet(host, "10.0.0.0", "255.0.0.0") ||
      host === "localhost") {
    return "DIRECT";

// Route specific domains through Hex Proxies if (dnsDomainIs(host, ".targetsite.com")) { return "PROXY gate.hexproxies.com:8080"; }

// All other traffic goes direct return "DIRECT"; } ```

Loading the PAC File

  1. In the Proxies tab, check **Automatic Proxy Configuration**
  2. Enter the file URL: `file:///Users/yourname/proxy.pac`
  3. Click **OK** → **Apply**

For hosted PAC files, use: `https://your-server.com/proxy.pac`

Benefits of PAC Files for Safari

  • Route only specific domains through the proxy while keeping general browsing direct
  • Reduce bandwidth costs by avoiding proxy routing for non-essential traffic
  • Dynamically adjust routing without changing system settings

Terminal Configuration for macOS

For power users and developers, macOS proxy settings can be managed via the command line.

Set Proxy via Terminal

# Enable HTTP proxy

# Enable HTTPS proxy networksetup -setsecurewebproxy "Wi-Fi" gate.hexproxies.com 8080 on YOUR_HEX_USERNAME YOUR_HEX_PASSWORD

# Enable SOCKS proxy networksetup -setsocksfirewallproxy "Wi-Fi" gate.hexproxies.com 1080 on YOUR_HEX_USERNAME YOUR_HEX_PASSWORD ```

Disable Proxy via Terminal

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

Check Current Proxy Settings

networksetup -getwebproxy "Wi-Fi"
networksetup -getsecurewebproxy "Wi-Fi"
networksetup -getsocksfirewallproxy "Wi-Fi"

Create a Toggle Script

Save this as `proxy-toggle.sh` for one-command proxy switching:

#!/bin/bash
INTERFACE="Wi-Fi"

if [ "$STATUS" = "Yes" ]; then networksetup -setwebproxystate "$INTERFACE" off networksetup -setsecurewebproxystate "$INTERFACE" off echo "Proxy disabled" else networksetup -setwebproxy "$INTERFACE" gate.hexproxies.com 8080 on YOUR_USERNAME YOUR_PASSWORD networksetup -setsecurewebproxy "$INTERFACE" gate.hexproxies.com 8080 on YOUR_USERNAME YOUR_PASSWORD echo "Proxy enabled" fi ```

Hex Proxies Session and Geo-Targeting

Rotating Sessions

Use your standard Hex Proxies credentials. Each request receives a different IP:

Username: YOUR_USERNAME
Password: YOUR_PASSWORD

Sticky Sessions

Append a session identifier to maintain the same IP:

Username: YOUR_USERNAME-session-safari01
Password: YOUR_PASSWORD

Country Targeting

Append a country code:

Username: YOUR_USERNAME-country-us
Username: YOUR_USERNAME-country-jp-session-safari02

Troubleshooting

Safari shows "cannot connect to the server" - Verify proxy server and port in System Settings → Network → Proxies - Test the proxy in Terminal: `curl -x http://user:pass@gate.hexproxies.com:8080 https://httpbin.org/ip` - Check that your Hex Proxies plan is active

Proxy works in Chrome but not Safari - Safari may cache old proxy settings. Quit Safari completely (Cmd+Q) and reopen - Clear Safari cache: Develop → Empty Caches (enable Develop menu in Safari → Settings → Advanced) - Verify both HTTP and HTTPS proxy are configured — Safari requires both

Authentication popup keeps appearing - macOS Keychain may have stale credentials. Open Keychain Access, search for "gate.hexproxies.com", and delete old entries - Re-enter credentials in System Settings

Proxy bypassed for certain sites - Check the "Bypass proxy settings for these Hosts & Domains" field in the Proxies tab — remove entries that should not be bypassed - Some macOS apps ignore system proxy settings — Safari always respects them

FAQ

Can I set a proxy only for Safari without affecting other apps? Not directly, since Safari uses system proxy settings. Use a PAC file to limit which domains route through the proxy, or use Firefox for isolated proxy browsing.

Does Safari support SOCKS5 proxy with DNS routing? Safari uses the macOS SOCKS proxy, which does not route DNS through the proxy by default. Use DNS-over-HTTPS or configure a secure DNS resolver to prevent leaks.

How do I remove proxy settings on Mac? Open System Settings → Network → your connection → Details → Proxies. Uncheck all proxy options and click OK → Apply. Or use the terminal commands listed above with the "off" state.

Can I use proxy settings with Safari on iPhone/iPad? Yes. Go to Settings → Wi-Fi → tap the (i) next to your network → Configure Proxy → Manual. Enter the Hex Proxies server and port. iOS does not support SOCKS proxy in the GUI — use a VPN profile or MDM configuration for SOCKS.

Tips

  • *Configure both HTTP and HTTPS proxies — modern websites are almost entirely HTTPS, so setting only HTTP proxy leaves most traffic unproxied.
  • *Use the networksetup Terminal commands to create scripts that toggle proxy settings with a single command.
  • *PAC files are the best way to selectively route Safari traffic — proxy only the domains you need.
  • *macOS SOCKS proxy does not proxy DNS by default. Use DoH or a secure DNS resolver to prevent DNS leaks.
  • *Quit and reopen Safari after changing proxy settings to ensure the new configuration takes effect immediately.

Ready to Get Started?

Put this guide into practice with Hex Proxies.

Cookie Preferences

We use cookies to ensure the best experience. You can customize your preferences below. Learn more