Set Proxy Bypass Domains (Exceptions) with networksetup
Choose exactly which hosts skip your configured proxy by rewriting the bypass list for a network service.
Run networksetup -setproxybypassdomains "Wi-Fi" "*.local" "127.0.0.1" "169.254/16"; pass the single word "Empty" to clear the list.
01Command
Command
$ networksetup -setproxybypassdomains "Wi-Fi" "*.local" "127.0.0.1" "169.254/16"02What it does
Each network service (Wi-Fi, Ethernet…) keeps its own proxy exception list, matching wildcard domains, literal IPs and CIDR ranges. Replacing the whole list — not appending — is how networksetup works, so always include the entries you want to keep. Verify the result with networksetup -getproxybypassdomains "Wi-Fi".
03Risk
!Warning: Apps must pick up the change; browsers usually do immediately, but long-running CLI tools may need restarting.
04Undo
Undo
$ networksetup -setproxybypassdomains "Wi-Fi" "Empty"05Sources
- networksetup - Configure Network SettingsEvidence: Documents -setproxybypassdomains for setting the proxy bypass (exceptions) list of a network service, with a space-separated list of domains or 'Empty' to clear.
- proxy_set_osx.sh — networksetup proxy setup scriptEvidence: A published shell script that configures macOS proxies with networksetup, including -setproxybypassdomains to define the exception list of hosts that skip the proxy.
Last verified: 2026-09-19 · Category: Network