VPN, proxy and filters
Proxy settings stop apps from connecting on a Mac
A proxy setting sends traffic through another server. If that server is wrong or not available, apps cannot connect, but other apps can work normally.
Symptoms
- Safari works, but one app or a Terminal tool shows a timeout or “proxy” error.
- Apps connect at home but fail on another network, or the opposite.
- Command-line tools fail with “Could not resolve proxy” or a connection refused to a local port.
- Connections stop after a VPN or proxy app quits.
Likely causes
- An old system proxy. A proxy set in System Settings stays after you leave the network that needs it.
- A PAC file or auto proxy discovery. The Mac gets proxy rules from a URL. If the URL does not load, some apps cannot connect.
- Proxy environment variables. Terminal tools read
http_proxy,https_proxyandall_proxy. These variables do not change the System Settings proxy, and apps from the Dock do not see them. - A proxy app that stopped. Some apps set a proxy to a local port, such as 127.0.0.1. If the app stops, nothing listens on that port.
- An app with its own proxy setting. Some apps have a proxy field in their own settings. That field is separate from the system proxy.
How to check
Open Terminal. Show the proxy configuration that macOS uses now.
scutil --proxyOutput Keys such as
HTTPEnable,HTTPSEnable,ProxyAutoConfigEnableandProxyAutoDiscoveryEnable. A value of 1 means on.Show the HTTP and HTTPS proxy for one network service. Replace Wi-Fi with your service name if necessary.
networksetup -getwebproxy Wi-Fi networksetup -getsecurewebproxy Wi-FiShow the PAC file and auto proxy discovery settings.
networksetup -getautoproxyurl Wi-Fi networksetup -getproxyautodiscovery Wi-FiShow the proxy variables in your shell.
env | grep -i proxyIf a proxy points to 127.0.0.1, find what listens on that port. Replace 7890 with the port.
lsof -nP -iTCP:7890 -sTCP:LISTEN
How to fix it
Choose Apple menu > System Settings > Network. Click the network service, then click Details.
Click Proxies. Turn off each proxy type that your network does not need.
Some hosts must not use the proxy. Add them to “Bypass proxy settings for these hosts & domains”.
Click OK to save the change.
To turn off a web proxy from Terminal, use networksetup. macOS can ask for an administrator password.
networksetup -setwebproxystate Wi-Fi off networksetup -setsecurewebproxystate Wi-Fi offNeeds an administrator password.
Remove old proxy variables from your shell startup file, such as
~/.zshrc. Then open a new Terminal window.Look in the settings of the failing app for its own proxy field. Make it agree with your network.
With Kilobat
Kilobat's connection check reports the system proxy and the PAC file. It also tests the direct path and the proxy path.
kilobat why api.example.comAdd
--appto read the proxy variables in that app's environment. Passwords do not show.kilobat why https://api.example.com/v1/models --app com.example.AppIf the app has its own proxy setting, give that address with
--proxy.kilobat why huggingface.co --proxy http://127.0.0.1:7890The check is free. See Find why one site or API won't connect for the app and MCP steps.
Questions
Why does Safari work when Terminal fails?
Safari uses the system proxy. Terminal tools use the proxy variables in your shell. The two settings can be different.
What is auto proxy discovery?
The Mac looks for proxy rules on the network. On a network that has no proxy, you can turn it off.
Sources
- Apple Support: Change proxy settings on Mac
- scutil(8), man page installed with macOS 27.2
- networksetup(8), man page installed with macOS 27.2
- lsof(8), man page installed with macOS 27.2
Sources checked on 29 October 2026. Man pages are the ones installed with macOS; open one with man <name> in Terminal.