Clash system proxy not working? Troubleshoot browser and terminal settings
Browsers may bypass the proxy because of extensions or PAC settings; terminals often ignore system proxies. Troubleshoot each separately with environment variable examples and test commands.
First, verify that Clash's local proxy port is reachable
The System Proxy switch adds a proxy address to your system settings. It doesn't mean every app will use that setting, or that every request reaching Clash will go through a remote node. Troubleshoot these three steps separately: whether the app connects to the local listening port, which rule Clash applies, and whether the selected outbound route can complete the request.
- Check the HTTP or mixed port shown in the Clash client. This guide uses
127.0.0.1:7890; if the client shows7897, replace the port in both commands and settings with7897. A mixed port accepts HTTP and SOCKS5 traffic, but a SOCKS-only port cannot be used as an HTTP proxy. - Run the commands below on the same machine as Clash. In Windows PowerShell, use
curl.exeto avoid older versions interpretingcurlas an alias forInvoke-WebRequest. If you're running the command in WSL, a container, or on a remote host, first check that127.0.0.1in that environment can actually reach Clash. - Open the client's Connections or Logs view at the same time. Use the connection address in the command output to confirm the proxy endpoint, then compare the request time and domain with the client logs to determine whether the request went direct, was rejected, or was routed through a proxy group.
curl -q -v --connect-timeout 5 --max-time 15 --noproxy no-match.invalid --proxy http://127.0.0.1:7890 https://example.com/
Put -q first so curl skips its default config file. --noproxy no-match.invalid overrides any environment no-proxy list without matching the test domain. If the output shows Connection refused while connecting to 127.0.0.1:7890, check that the core is running and the port is listening before switching nodes. If a CONNECT example.com:443 tunnel is established, the local HTTP proxy accepted the tunnel request; whether the page loads also depends on the subsequent TLS and HTTP responses. Even if the test succeeds, check Clash's connection log to tell DIRECT traffic from traffic sent through a remote outbound.
Browser not using the proxy? Check system settings, extensions, and PAC
Check which proxy settings the browser actually uses
- Chrome and Edge on Windows 11: Go to Settings → Network & internet → Proxy and check the address and port under Manual proxy setup. After enabling Clash's system proxy, if Windows still shows an old port, check whether another proxy client is changing the same setting.
- Safari and Chrome on macOS: Go to System Settings → Network, select the network service you're currently using, then open Details → Proxies. Make sure you're checking the active connection, not another network interface. Check the HTTP and HTTPS proxy entries added by the client and their ports.
- Firefox: Go to Settings → General → Network Settings → Settings. If Firefox is set to No proxy, Manual proxy configuration, or Automatic proxy configuration URL, it won't simply follow the system proxy switch. To test the system setting, select Use system proxy settings on a device where you can change it, then start a new request.
Use the same URL to tell extensions and PAC apart
Note the script URL and manual proxy address in your system settings, along with the current mode of any browser proxy extensions. On a personal device you manage, disable only the extension that switches proxies; leave the system proxy unchanged. Close the old test tab, then visit https://example.com/ in a new window and check for a new Clash connection. Don't rely on an incognito window alone: extensions allowed to run in incognito can still affect the test.
If disabling the extension doesn't produce a connection, check PAC next. A PAC script selects a proxy based on the URL or domain: the same script can return PROXY for one domain and DIRECT for another. So loading a page in the browser doesn't prove the proxy is working. If a personal device has both an automatic script and a manual proxy configured, note the original settings, temporarily turn off the automatic script, and leave only the verified local HTTP proxy enabled. Then test the same URL again. If a connection appears only now, check the PAC match conditions and returned port. Ask your administrator to review managed settings on a work device.
Terminal not using the proxy? Set environment variables for the current session
If curl works with an explicitly specified proxy but regular terminal commands don't show up in Clash, set a proxy for the current session first. Many command-line tools ignore desktop system proxy settings, and support for proxy environment variables varies by tool. Verify with curl, then check the target tool's own proxy settings. Don't put a one-off test straight into a global startup file.
Bash and zsh
export http_proxy=http://127.0.0.1:7890
export https_proxy=http://127.0.0.1:7890
curl -q -v --connect-timeout 5 --max-time 15 --noproxy no-match.invalid https://example.com/
Set both variables to cover HTTP and HTTPS destinations. The value of https_proxy still starts with http:// because the connection is to a local HTTP proxy; HTTPS destinations use CONNECT to establish a tunnel. For HTTP destinations, curl reads lowercase http_proxy and doesn't accept uppercase HTTP_PROXY as a substitute. Test in a temporary shell; when you exit, these variables won't carry over to the original session.
Windows PowerShell
$env:http_proxy = 'http://127.0.0.1:7890'
$env:https_proxy = 'http://127.0.0.1:7890'
curl.exe -q -v --connect-timeout 5 --max-time 15 --noproxy no-match.invalid https://example.com/
In PowerShell, assigning $env: variables affects the current process and any child processes started afterward. It won't update terminals or IDEs that were already open. If the app was launched from an older IDE session, test in that IDE's terminal. If your terminal runs in WSL, don't treat results from a Windows PowerShell session as WSL results; verify the proxy address and connectivity from inside WSL.
Check the no-proxy list and the tool's own settings
The command above doesn't pass --proxy, but it temporarily overrides the no-proxy list with --noproxy. After confirming the output shows a connection to 127.0.0.1:7890, run it again without --noproxy no-match.invalid. If only the second run bypasses the proxy, check whether no_proxy or NO_PROXY includes the target domain, its domain suffix, or *, which bypasses the proxy for everything. Don't permanently clear the entire list to fix one site; internal services may rely on it.
If curl uses the proxy but Git doesn't, first run git config --show-origin --get-regexp '^http\..*proxy$' to find which file provides the proxy setting. Then check whether the repository uses HTTPS or SSH. Git's HTTP proxy settings don't apply to SSH remote URLs. Don't disable certificate verification or post proxy URLs containing credentials or full debug output publicly.
Use the results to identify the issue: port, rules, or app settings
| What you see | Check first |
|---|---|
Explicit proxy command can't connect to 127.0.0.1:7890 |
Check the actual listening port, whether the core is running, and whether the command and Clash are in the same network environment. |
| Explicit proxy works, but there's no matching Clash connection for the browser | Test with a new request, then check the browser's proxy source and bypass rules. Don't change nodes yet. |
| Explicit proxy works, but there's no matching connection for the terminal tool | Check the variables inherited by the current process, the no-proxy list, and the proxy options supported by the tool. |
Clash logs the request as DIRECT, REJECT, or an upstream timeout |
Check the matched rule and selected policy first. Investigate node connectivity only after confirming the request was sent to a remote node. |
When should you consider TUN mode?
Consider TUN mode only if the browser and curl can both connect through a verified port, but a specific app ignores the system proxy and has no proxy option of its own. TUN captures traffic routed through a virtual network interface, so apps don't need to understand HTTP proxies; however, routing, DNS, and Clash's traffic rules still apply. Test the app's traffic with TUN separately—don't change nodes, ports, and rules at the same time. Revert temporary changes when you're done and keep only the one confirmed to work.