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)
- Open **System Settings** from the Apple menu
- Click **Network** in the sidebar
- Select your active connection — **Wi-Fi** or **Ethernet**
- Click **Details...**
- 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 ProxySetting Up Web Proxy (HTTP)
- Check **Web Proxy (HTTP)**
- Enter the following:
Server: gate.hexproxies.com
Port: 8080
Username: YOUR_HEX_USERNAME
Password: YOUR_HEX_PASSWORD3. Click **OK**
Setting Up Secure Web Proxy (HTTPS)
- Check **Secure Web Proxy (HTTPS)**
- Enter the same credentials:
Server: gate.hexproxies.com
Port: 8080
Username: YOUR_HEX_USERNAME
Password: YOUR_HEX_PASSWORD3. 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)
- Open **System Preferences** → **Network**
- Select your active connection from the left sidebar
- Click **Advanced...** → **Proxies** tab
- 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.
- In the Proxies tab, check **SOCKS Proxy**
- Enter:
Server: gate.hexproxies.com
Port: 1080
Username: YOUR_HEX_USERNAME
Password: YOUR_HEX_PASSWORD3. 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
- In the Proxies tab, check **Automatic Proxy Configuration**
- Enter the file URL: `file:///Users/yourname/proxy.pac`
- 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" offCheck 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_PASSWORDSticky Sessions
Append a session identifier to maintain the same IP:
Username: YOUR_USERNAME-session-safari01
Password: YOUR_PASSWORDCountry Targeting
Append a country code:
Username: YOUR_USERNAME-country-us
Username: YOUR_USERNAME-country-jp-session-safari02