Check Clash’s Local Proxy Port First

The client’s System Proxy toggle usually just writes the local proxy address to your operating system. Browsers may use this setting, but extensions, manual settings, or management policies can override it. Command-line tools each have their own ways of getting proxy settings: a browser working doesn’t mean the terminal on the same computer is using the same port.

  1. First, check the client’s core status and current port. In clients powered by Clash or mihomo, mixed-port accepts both HTTP and SOCKS connections; port is the HTTP proxy port, and socks-port is the SOCKS proxy port. The examples below use HTTP or mixed port 7890. If the client shows 7897, replace the port in the commands as well.
  2. Use 127.0.0.1 if the client and the program you’re testing run in the same system environment. Don’t mistake the controller port (for example, 9090) for a proxy port. In WSL, a virtual machine, or a container, 127.0.0.1 may not reach the host. Get the test working in a host terminal first, then troubleshoot each environment separately.
  3. Open the client’s connection history or logs, then send another test request. Once you see the destination domain, check which rule matched and whether the request went DIRECT or through a proxy node. In rule mode, a DIRECT match only means that request went out directly through Clash; it doesn’t mean the app bypassed Clash.

Browser Proxy Not Working: Check System Settings, Extensions, and Bypass Lists

Check the System Proxy Address, Not Just the Client Toggle

  • Windows 11: Go to Settings → Network & internet → Proxy. Under Manual proxy setup, check that the Use a proxy server address and port match the client. If Set up script is also enabled, first confirm whether it’s managed by your organization—don’t delete it outright.
  • macOS 13 and later: Go to System Settings → Network → select the active network service → Details → Proxies. Check Wi-Fi and Ethernet separately. Verify the HTTP and HTTPS proxy settings, and make sure the domain you’re testing isn’t on the list of hosts that bypass the proxy.
  • Firefox: Go to Settings → General → scroll to Network Settings at the bottom of the page → Settings. To use the system proxy, select Use system proxy settings—not No proxy, an old manual address, or a different automatic proxy configuration.

Use the Same URL to Find Where the Proxy Setting Is Overridden

In Chrome, open chrome://extensions/; in Edge, open edge://extensions/. Disable any proxy-switching extensions you installed, then open https://example.com/ in a new tab and compare the request with the matching entry in Clash’s connection history. Incognito mode isn’t a reliable substitute: extensions allowed in incognito can still run. If the browser says it’s managed by your organization, check chrome://policy/ or edge://policy/ for proxy policies. Ask your administrator about managed settings.

If only one site is affected, test that specific domain again. The main page, login redirect, and images may come from different domains, so look for the failed request in the connection history. If the request appears, check the matched rule, selected node, and any connection errors. If it doesn’t, check the system bypass list, browser proxy settings, and whether the page loaded from cache.

Terminal Proxy Not Working? Compare with curl Using an Explicit Proxy

Both commands below request the same HTTPS URL. The first tells curl not to use a proxy; the second explicitly connects to a local HTTP proxy and limits bypasses for this request to two local addresses, so an existing NO_PROXY=* won’t bypass the proxy. Both commands set an 8-second connection timeout and a 15-second total timeout. In Windows PowerShell, use curl.exe instead of curl to avoid invoking a different command in older versions.

curl --noproxy "*" -v -I --connect-timeout 8 --max-time 15 https://example.com/
curl --proxy http://127.0.0.1:7890 --noproxy "localhost,127.0.0.1" -v -I --connect-timeout 8 --max-time 15 https://example.com/
Result of the Second CommandNext Step
Connection to 127.0.0.1:7890 refusedCheck that the core is running, the port is correct, and the terminal is in the same system environment as the core. The request hasn’t reached the destination site yet.
Connected to the local port, but CONNECT failedMake sure you’re using an HTTP or mixed port. Then check Clash logs for the matched rule, node connection, and destination resolution errors.
CONNECT succeeded, but a TLS error followedTell the difference between a successful tunnel and successful certificate verification by the destination site. Check the system clock, destination domain, and the tool’s certificate trust settings. Disabling certificate verification is not a fix.
Received an HTTP response from the destination siteThe request used an explicit proxy. Check the connection history to see whether it went through a proxy node or DIRECT. It’s also possible for both commands to succeed.

If your configuration only enables a SOCKS port, such as 1080, change the second command’s proxy argument to --proxy socks5h://127.0.0.1:1080. This lets curl pass the destination hostname to the SOCKS proxy for resolution. Don’t keep trying different protocols on the same port; first confirm which setting it corresponds to.

Explicit Proxy Works? Check Environment Variables and Tool Settings

If curl works with --proxy but fails without it, first check which proxy settings the tool reads. For curl, you can temporarily set http_proxy and https_proxy in the current terminal. The variable name follows the URL’s protocol. Even when you’re visiting an HTTPS site, if the local proxy endpoint uses HTTP, the variable value should still start with http://. For HTTP URLs, curl only recognizes lowercase http_proxy. On case-sensitive systems, don’t set only HTTP_PROXY.

Bash or zsh: Set Variables for a Single Command

http_proxy=http://127.0.0.1:7890 \
https_proxy=http://127.0.0.1:7890 \
no_proxy=localhost,127.0.0.1 \
curl -v -I --connect-timeout 8 --max-time 15 https://example.com/

PowerShell: Set Variables Temporarily in a New Window

$env:http_proxy = 'http://127.0.0.1:7890'
>$env:https_proxy = 'http://127.0.0.1:7890'
>$env:no_proxy = 'localhost,127.0.0.1'
>curl.exe -v -I --connect-timeout 8 --max-time 15 https://example.com/

These PowerShell settings affect only the current process and any child processes it starts. Close the test window when you’re done. If curl works but Git or npm still fails, check whether the tool has an old proxy address saved. For Git, use git config --show-origin --get-regexp '^http\..*proxy$' to see where the setting comes from. For npm, run npm config get proxy and npm config get https-proxy. The output may contain proxy credentials, so don’t paste it into a public support post.

If the problem only occurs in an editor’s integrated terminal, run the same test in a standalone terminal first. An editor that’s already running won’t automatically pick up variables set temporarily in another window. Set them in the terminal where you run the command, or restart the editor after changing persistent settings. Test temporarily before adding anything to a startup file, so tools don’t keep trying to connect to a local port after the client exits.

When to Check TUN After Testing the System Proxy and Terminal

If your browser and curl with --proxy both reach Clash, check whether the client supports TUN only when a specific program has no proxy option and ignores both system proxy settings and environment variables. TUN captures traffic at the system routing layer; what it can handle depends on the core, permissions, routes, and DNS settings. It won’t fix a failed local listener, a rule matching the wrong destination, or a proxy node that times out.

Before wrapping up, retest only the program and domain that originally failed. Confirm the request reaches Clash and that the final route is what you expect. If you need help, note your operating system, client and core versions, actual port and protocol, the curl command that failed, and the matching rule or error at the time. Remove subscription URLs and credentials before sharing. These details are more useful for troubleshooting than a screenshot showing that the system proxy is enabled.