Read the Logs: First Check Whether the Request Reached Clash
Retry the failed request once and note the local time and destination domain. Then look for the corresponding entry in the client's Logs or Connections view. Menu names and log formats vary by client; the examples below use configuration fields from the mihomo (Clash Meta) core. If a setting isn't visible in the interface, check the configuration actually passed to the core rather than the original subscription file.
infois a good starting point for troubleshooting. It usually shows a connection summary, the matched rule, and the selected outbound. Note the destination, port, matched rule, and outbound actually used.- Use
warninganderrorentries to spot problems, but they may also come from background latency tests, rule-set updates, or other apps. Attribute an error to this request only when its timestamp and destination match. - If you need more detail, temporarily set
log-leveltodebugin the active configuration, reload it, and reproduce the issue once. Then restore the previous level. Before sharing logs, redact subscription URLs, tokens, proxy server addresses, and private network addresses. Keep the relevant error lines and their order.
| Log entry or symptom | Check first | Next step |
|---|---|---|
bind: address already in use | Address and port that failed to bind | Check the listening process; distinguish proxy ports from the controller port |
no such host | Hostname named in the error | Distinguish the destination domain from the proxy server's domain |
dial tcp … i/o timeout | Actual dial address and outbound | Keep the destination fixed and test with one other proxy server |
Matched MATCH or used DIRECT | Mode, earlier rules, and selected policy group | Check the active configuration, then start a new connection |
Port in Use: Distinguish the Proxy Listener from the Controller
If the error occurs when the core starts, first check which port failed to bind. For example, mixed-port: 7890 is a specific configuration example, not a default for every client. mixed-port accepts both HTTP and SOCKS proxy requests; port is the HTTP proxy listener, and socks-port is the SOCKS proxy listener. external-controller is the controller interface. If it fails to bind, the dashboard may not be able to read the status, but that doesn't mean the proxy listener failed to start.
Suppose the core reports that TCP port 7890 is already in use. In Windows, use PowerShell to find the listening process PID:
Get-NetTCPConnection -State Listen -LocalPort 7890 |
Select-Object LocalAddress, LocalPort, OwningProcess
On macOS or Linux, if lsof is installed, use this command to check the process name and PID:
lsof -nP -iTCP:7890 -sTCP:LISTEN
If an older client is still running, exit it normally first. If another app needs that port, choose a confirmed free port in Clash and update the system proxy or the app's manual proxy address to match. After restarting, check the listener again and confirm the new PID belongs to the current client. If you changed only the controller interface, don't point your browser proxy at the controller port.
Dial Timeouts: Identify Which Connection Hop Timed Out
dial tcp … i/o timeout means the TCP connection attempt did not complete before the deadline. The request destination in the logs may differ from the address actually dialed: the rules page shows the target website, while the dial error may show the selected proxy server's address. Check both before deciding whether to investigate the proxy server or the destination. Don't confuse this with connection refused: that means the connection was rejected, so first check that the dial port is correct and the remote side is listening.
- Test the local proxy listener. Suppose
mixed-portis listening on127.0.0.1:7890. Use the command below to explicitly set the HTTP proxy. If the local port itself refuses the connection, check the proxy listener first. If the core logs a request at the time of the test, investigate the outbound next. In Windows PowerShell, usecurl.exe. - Keep the network and destination unchanged; switch only the proxy server. Note the server actually selected by the policy group, not just the group name. If the same destination times out repeatedly on server A but works on server B, first check A's address and port, and whether your current network can reach A.
- Keep the proxy server unchanged; compare destinations. Failures across multiple destinations using the same server point to a different issue than a failure affecting just one site. If only one site fails, first check whether both destinations really match the same rule and use the same outbound. A successful latency test only shows that its test destination was reachable at that moment; it doesn't prove the actual destination is reachable.
curl --proxy http://127.0.0.1:7890 --noproxy "" --connect-timeout 5 --max-time 15 -I https://example.com/
DNS Resolution Failures: Identify the Destination, Proxy Server, or Upstream Domain
First identify the hostname that the failed lookup was trying to resolve. A failure to resolve the destination website is different from a failure to resolve the proxy server's server hostname, and each needs to be addressed in a different place. If the hostname belongs to a proxy server and the core's DNS is enabled, check whether dns.proxy-server-nameserver is set in the active configuration and whether that upstream is reachable on your current network. Confirming that the website domain resolves does not rule out a proxy server hostname issue.
- Check the destination domain: See whether
dns.nameserver-policyroutes that domain to a specific upstream. If no policy matches, check the regular upstreams indns.nameserverand any fallback settings. A system-level lookup returning an address doesn't prove the app's request used the same DNS path. - Check the upstream itself: If an encrypted DNS upstream uses a hostname, first confirm how that hostname is resolved initially. In mihomo,
dns.default-nameserverresolves DNS upstream hostnames. If the upstream is reachable only through a proxy server whose hostname depends on that same upstream, you may have a circular dependency. - Distinguish an error response from a query timeout:
NXDOMAINmeans the resolver says the domain does not exist. Check the spelling, then confirm the upstream can resolve that internal or private domain. If the query timed out, check the path to the upstream first; changing the destination website alone doesn't show that the upstream is working again.
Test TUN-intercepted traffic separately from explicit proxy traffic. mihomo's tun.dns-hijack handles only DNS traffic covered by the hijack settings. If the browser uses its own secure DNS, HTTPS-based queries can't be assessed as ordinary DNS hijacking. If the issue occurs only in TUN mode, first check whether DNS requests and application connections are both being intercepted, then change the upstream if needed. Don't change DNS, proxy servers, and operating mode all at once.
Rule Not Matched: Check the Mode, Rule Order, and Actual Outbound
A connection going the wrong way doesn't necessarily produce an error. In rule mode, rules are evaluated from top to bottom, and the first match is used. If the logs show MATCH, the request reached the fallback rule; it doesn't mean the rule engine stopped working. DIRECT doesn't necessarily mean a rule is wrong, either: distinguish a rule that explicitly selects DIRECT, a policy group that selected DIRECT, and a client currently running in direct mode.
- Check the operating mode. Confirm that the active configuration has
mode: rule, then review the rule list. In global or direct mode, rule order cannot explain the outbound used. - Check the destination and rule order.
DOMAIN,example.com,DIRECTmatches only the exact domainexample.com;DOMAIN-SUFFIXalso matches its subdomains. If the core has only the destination IP and no domain information to match, even a correctly written domain rule won't match. Confirm the actual destination, put specific rules before broader rules that could match first, and keepMATCHat the end. - Check rule sets and overrides. If you use
RULE-SET, check that the corresponding rule provider loaded successfully and that the rule set includes the destination. After a subscription update, client-side overrides or merged configuration may differ from the original file. Save your changes and start a new connection; use its logs to assess the result rather than treating an existing connection's outbound as evidence of the change.
Retest in Order: Listener, App Routing, Rule Match, DNS, and Dial
If the core fails to start, first check the listener address and port in the logs. If the app reports an error but there's no corresponding log entry, test the local listener with an explicit proxy, then check the app's system proxy or TUN routing. Once the request reaches the core, check the matched rule, actual outbound, and address that failed: for a DNS error, investigate how that hostname is resolved; for a dial error, investigate the relevant connection hop. This order helps narrow down the issue; it doesn't mean every connection matches a rule before DNS resolution. For example, some IP-based rules can trigger DNS lookups.
Change one thing at a time and establish a new connection to the same destination. Keep the before-and-after log entries so you can compare at least the time, destination, rule, outbound, and error. If the explicit proxy works but the original app still fails, this test confirms only that the explicit proxy path is working. Next, investigate the app rather than switching proxy servers again.