Troubleshooting 8-minute read

Clash Connection Timeouts: Troubleshoot from Local Ports to Remote Servers

Troubleshoot Clash timeouts step by step: check local ports and system proxy, then DNS and clock sync, protocol settings, and the remote server.

Local Ports and System Proxy: Make Sure Traffic Reaches the Core

First, distinguish between two symptoms: a timeout in the node latency test, or a timeout when opening a webpage in your browser. The former usually means the core could not reach the test URL through the node. A successful test only confirms that one probe worked; it does not prove that your browser is using the proxy. For a consistent retest, use the same destination and node, then check the entry for that moment in the client's Logs or Connections view.

Check the Listening Port, Then Send an Explicit Proxy Request

  1. In the client's Settings, find the current HTTP or mixed proxy port; menu names vary by client. In the configuration, port sets the HTTP proxy, while mixed-port accepts both HTTP and SOCKS requests. The example below uses 7890; use the port configured in your running client. Do not enter the external-controller API port in your proxy settings.
  2. In Windows PowerShell, run Get-NetTCPConnection -LocalPort 7890 -State Listen to check the listening address and OwningProcess, then match the PID in Task Manager under Details. On macOS or Linux, use lsof -nP -iTCP:7890 -sTCP:LISTEN to find the listening process. If nothing is listening, first check whether the configuration loaded successfully. If another app is using the port, change the client's proxy port and update the app settings to match.
  3. Run the command below on the same device. In Windows PowerShell, use curl.exe. If TUN is enabled and this test does not rely on it, temporarily turn it off to reduce variables.
curl -v --proxy http://127.0.0.1:7890 --noproxy localhost,127.0.0.1 --connect-timeout 5 --max-time 15 https://example.com/

This command explicitly uses the local HTTP proxy and prevents proxy bypass settings in environment variables from affecting the request to example.com. If it cannot connect to 127.0.0.1:7890, troubleshoot the local listener first. 200 Connection established means the proxy accepted the CONNECT request; it is not the destination website's HTTP status. Check the subsequent TLS handshake and HTTP response. Also check the destination domain, matched rule, and final outbound in the Connections view. If it shows DIRECT, this request did not test a proxy node.

Explicit Proxy Request Works, but the Browser Still Times Out?

Open the same URL in your browser first, then check whether the corresponding entry appears in the Connections view. On Windows, check Settings → Network & Internet → Proxy. On macOS, check System Settings → Network → your current network service → Details → Proxies. Compare the local address, port, and bypass list. If the browser or app has its own proxy settings, check those too. The system proxy only affects apps that read the system proxy settings. TUN uses a virtual network interface; when troubleshooting, test the connection method in use rather than switching back and forth between modes.

DNS and Clock Sync: Tell Resolution Failures from Handshake Failures

For a lookup … entry in the logs, first identify the domain in place of the ellipsis. If the node server's hostname cannot be resolved, the core has no address to connect to yet. If the destination website's hostname fails to resolve, check the matched rule and outbound to determine whether DNS resolution is handled by the app, the core, or the remote end. The two domains may follow different resolution paths, so don't skip this check just because other websites open in your browser.

  • Start with the domain named in the logs. In a terminal, enter nslookup, then enter the full hostname reported in the error. Record the results for both the node hostname and the destination hostname. If the system lookup succeeds but the core still reports an error, inspect the DNS settings in the active configuration; a successful system lookup does not verify the core's DNS resolution. In Mihomo, if the configuration uses proxy-server-nameserver, check that the resolver is reachable and returns the node's address.
  • Distinguish no record from no response. NXDOMAIN means the resolver says the domain does not exist. Check the spelling, configuration source, and whether the subscription is up to date. If the query times out, first check whether the current network can reach the configured DNS server. If the logs show a dial timeout only after resolving an IPv6 address, test the same node on a network confirmed to support IPv6. Don't change DNS, the node port, and system settings all at once.
  • Sync the clock before troubleshooting certificate errors. On Windows, go to Settings → Time & language → Date & time, enable automatic time, and select Sync now. On macOS, go to System Settings → General → Date & Time and check automatic time settings. Retry once the clock is synced. If the certificate is still reported as not yet valid, expired, or mismatched to the hostname, check which connection stage reports the error and which hostname it refers to. Do not disable certificate verification to dismiss the warning.

Protocol Settings: Verify the Node Actually Selected

First, check the current selection in the proxy group on the Proxies page, then inspect the destination request's outbound chain on the Connections page. An auto-select group may switch nodes during a retest; if your client supports it, temporarily pin the node in a manual selection group. A successful subscription update only means the client fetched and loaded the configuration. It does not prove the node still works or that the request matched this proxy group.

What to check How to check
Server and port Check server and port against the current subscription. These are the remote endpoint settings, not the local 7890 port. After changing an endpoint, reload the configuration and check the group selection.
Protocol and authentication Check type and the authentication fields required by that protocol. If the core reports that the type is unsupported while loading the configuration, check the actual core and its version on the client's About page or in the startup logs, then consult the core's protocol reference. The client version is not a substitute for the core version.
TLS and transport Compare only the settings used by the node. For example, check the path and Host for a WebSocket node; if TLS is enabled, check the server name used for the handshake. The WebSocket Host, TLS server name, and dial address may differ. Do not assume one can replace the others.

Whenever possible, update the configuration from the original subscription instead of guessing the server-side settings. If you use local overrides, check whether they changed DNS, rules, or proxy groups. Use the logs to narrow down the issue: fix configuration fields first if parsing fails; if the connection reaches the remote server but fails during authentication or the handshake, check credentials and transport settings. After changing one setting, retest with the same destination and node to see whether that change made a difference.

Remote Server: Narrow It Down with Two A/B Tests

Check the remote service only after the local proxy has accepted the request and the rule has selected the expected node, but the logs still show a dial failure. Change just one condition per test, and reuse the same destination and explicit proxy command.

  1. Switch nodes on the same network. Stay on the current network and try another node from the subscription that is known to work. If only the original node fails, first check its endpoint, account status, and service announcements. This alone does not prove the server is down.
  2. Switch networks on the same node. Use the same device and configuration to test once on the original network and once on a mobile hotspot. If it fails only on the original network, check DNS resolution, routing, or connection restrictions between that network and the node. If it fails on both networks while a comparison node works on both, send the service provider the failure window and endpoint details for investigation.
  3. Change the destination, not the node. If the same node can reach other known-working HTTPS URLs but the built-in latency test times out, check the client's test URL and timeout threshold. A faulty test URL does not mean the node itself is unavailable. Conversely, if the latency test succeeds but a site you need does not, check that site's matched rule and access result separately.

When reading the logs, check both the error and the address it refers to. A connection refused error for a remote endpoint means that connection was explicitly rejected; the remote service may not be listening, or an intermediary may have rejected it. An i/o timeout means a step did not complete within the time limit, but the message alone does not identify where it failed. For a TCP endpoint, you can use Test-NetConnection on Windows, specifying the subscription's server and port with -ComputerName and -Port for an additional comparison. A successful TCP probe does not prove authentication works or verify a node protocol based on UDP.

Retest and Report: Preserve Evidence of the First Failure

After making a fix, run two checks. First, repeat the explicit proxy request and confirm that the destination responds and the Connections view shows the expected outbound. Then restore your usual system proxy or TUN mode and open the same destination in the app that originally failed. If the first check passes but the second fails, revisit how the app connects and which rule it matches; there's no need to change the node settings again.

When reporting an issue to the service provider, include the failure time and time zone, client and core versions, network type, node identifier, first relevant error, and results from both comparison tests. Before sharing logs, remove subscription URLs, credentials, tokens, and unrelated browsing records. Instead of saying “everything times out,” describe the results precisely: “The same node times out while dialing on both my current network and hotspot, but another node in the same group reaches the test URL on both.” This makes it easier to identify which part of the connection to investigate next.

Download the Latest Clash Version