Troubleshooting

Clash Troubleshooting Guide

For a first install, importing a profile, or checking your connection, start with the quick start guide. If setup is complete but things aren’t working as expected, choose the symptom that fits. This guide works through network access, traffic capture, rules, DNS, and outbound connections—you don’t need to read it from the beginning.

No internet access: distinguish network outages, traffic capture, and outbound failures

Restore a direct-connection baseline

First check whether every app is offline or only a particular browser, command-line tool, or destination. Note the original system proxy and TUN settings, then turn both off in the client. Don’t just close the window: the tray process may still be running. Conversely, force-quitting the process can leave system proxy settings behind. On the same device, try two sites that normally work without a proxy, and check that the browser isn’t using its own proxy extension. If they still won’t load with traffic capture disabled, switch to another known-good network to help separate a device issue from a problem with the current connection.

On hotel, campus, and public Wi-Fi, getting an IP address doesn’t mean you’re online. Check whether the system prompts you to sign in, then complete the network’s official authentication process. If the client is closed but your browser says it can’t connect to a proxy server, open system proxy settings and check whether a manual proxy or automatic configuration script still points to an old address. If your organization set the original values, restore them rather than clearing everything. Until the baseline is restored, changing proxy groups or rules will only make the problem harder to isolate.

Use one traffic-capture method at a time and check new connections

Once the baseline works, start the core and confirm the active profile has loaded. To test in a browser, enable only the system proxy. Test TUN separately when checking apps that don’t use the system proxy. Make one new request at a time, then find it on the client’s Connections page by destination domain or timestamp. If there’s no entry, check whether the app is sending requests to the client. If there is an entry, check the matched rule and actual outbound. The connection list may show only some active requests, so check logs from the same time period when needed; a missing entry alone isn’t conclusive.

If the matched rule is DIRECT, the request reached the core but took the direct route. That’s different from traffic that was never captured. If it matched REJECT, find the rule that blocked it rather than switching nodes first. For a proxy group, expand the connection chain to see the actual outbound selected. If the interface shows only the group name, check the group’s options on the Proxies page. Even when the configuration says mode: rule, check the current mode in the interface; the client may override it at runtime.

What you seeNext step
Still fails with traffic capture offCheck the network, leftover system proxy settings, and system DNS.
No matching entry with traffic capture onCheck the proxy address, listening port, or TUN route used by the app.
Connection logged, but outbound differs from expectedCheck the current mode, first matching rule, and proxy group selection.
Connection logged, expected outbound, but request failsCheck the outbound error to distinguish DNS lookup, dialing, and handshake failures.

Fix the earliest error first

If only one domain fails, don’t switch the entire configuration to global mode right away. Check the order of rules: rules are matched from top to bottom, so a broad suffix near the top can catch traffic before a more specific entry below it. The final MATCH handles requests that haven’t matched earlier rules. Move the specific rule above any broad rule that would match first, and make sure you’re editing the active configuration layer—not a temporary file that will be overwritten on subscription refresh. Reload, then create a new connection; an existing one can’t confirm that the updated rule is working.

If the rule and outbound are correct, find the earliest error for that request. For a DNS lookup failure, see the DNS section and check which name failed. For a dial, handshake, or read/write timeout, see the node timeout section to narrow it down. After fixing the issue, retest the original destination and a service that should connect directly. Both should follow their expected routes; otherwise, the problem may simply have shifted to another outbound.

Node timeouts: distinguish failed probes from failed requests

Test real requests before interpreting latency checks

The latency shown by a client usually comes from a request to a test URL. It isn’t a regular network probe to the node address, and it doesn’t reflect all the time an app request takes. The test URL may be unreachable, return an unexpected status, or redirect, causing the interface to report a timeout. First pin one proxy group to a specific option. Use the same app to access a destination that normally works, and check Connections to confirm which node was actually used. If the request succeeds but the latency check fails, look at the test URL and probe method first. Don’t change rules or disable usable nodes based on that result alone.

If the group type is url-test, check its url and interval. A manual test in the client may use a different URL from the one used by the automatic group. If the group switches automatically, record the actual outbound at the time of the test rather than just the option shown afterward. For comparison, temporarily pin an outbound in an existing manual selection group. Before changing the probe interval, check which fields and units the current core supports. Frequent probes can clutter logs and won’t fix the outbound route itself.

Identify the stage where the error occurred

Start with the destination address in the log. If lookup or no such host is followed by the node server’s domain, the problem occurred before the outbound connection was established. If it’s followed by the destination domain, check which side was supposed to resolve it. If dial tcp is followed by a connection timeout, compare the address and port to determine whether the timed-out endpoint was the node or a direct destination. An i/o timeout can also occur while waiting for a response after connecting; those words alone don’t prove a node is offline.

If the connection is refused immediately, check for stale subscription entries, confirm the active profile has actually updated, and verify that the node address and port came from a trusted source. For TLS handshake errors, check the device’s date, time, and time zone, then confirm the configured protocol and server name match the provider’s instructions. Keep certificate verification enabled; don’t disable it just to clear a warning. If the configuration looks correct but the connection still fails, record the failure stage and how often it occurs, then ask the service provider to investigate instead of repeatedly guessing and overwriting parameters.

Compare one node, one network, and one destination

Choose one node that fails and one known-good candidate. On the same network, test both in the same app against the same destination, creating a new connection each time and noting the matched rule. If only one node fails, focus on its configuration or service status. If several fail, check whether they share a service domain, access address, or DNS path. Then test the same node on another available network. If it fails only on the original network while the device and configuration are unchanged, the problem is narrowed to the route between that network and the outbound; it doesn’t prove the entire service is down.

Don’t treat one successful latency check as proof that the problem is fixed. Confirm the failing node can establish a real connection, the automatic proxy group selects the expected outbound, and repeated requests don’t reproduce the same error. If the issue occurs only at certain times, save one successful and one failed log entry, including timestamps and the exact error text, rather than reporting only that it’s slow in the evening. For common log fields, see Understanding Clash runtime logs. If the error involves a DNS lookup before the first connection, continue with the DNS resolution path.

Subscription issues: check the request, response, and profile load

Distinguish adding a subscription, updating it, and enabling it

Find the specific entry on the Profiles or Subscriptions page, check when it last updated successfully, and confirm it’s the active profile. Some clients keep the last successfully downloaded file, so a failed update may not immediately cut off access. Others let you import a file but require you to enable it before the core loads it. Keep a working profile before troubleshooting; don’t delete the entry and re-import it. Trigger one manual update in the client and note whether the error occurs during download, file parsing, or applying the configuration. These are separate stages, not necessarily an API problem.

If the error occurs before a response arrives, check the device’s connection, clock, and subscription hostname. Distinguish the network path used for subscription updates from the path used to access regular websites through the proxy. The client’s updater may not use the system proxy or the core’s currently selected outbound. If the client offers an update network setting, follow its instructions and change only that setting for comparison. Before testing another network, turn off automatic updates to avoid interference from background retries, then restore your usual schedule afterward.

Check the status code and response content type

If the log includes an HTTP status, handle it based on where the response came from. For 401 or 403, check whether the link was revoked, the account still has access, or the service restricts this request. For 404, get the correct link from the provider’s account page. For 429, stop retrying and wait as long as the service specifies. A 5xx response usually means the server or an intermediary gateway couldn’t complete the request. If the same subscription fails on another device, keep the timestamp and status code for the provider. Repeatedly clicking Update can turn a temporary issue into a rate limit.

A 200 response doesn’t necessarily contain a configuration. A login page, network sign-in page, or subscription in another format may return success but fail during import. Confirm that the provider explicitly labels the link as compatible with Clash or the relevant core, then inspect the start of the downloaded file in a trusted local environment. If it contains webpage markup instead of the expected configuration fields, use the correct link or complete the normal sign-in process. Never paste a full subscription URL into a third-party converter, chat, or screenshot; its path and query parameters may contain access credentials.

Find YAML errors, invalid references, and overrides

When the log gives a line number, check the surrounding lines first. Missing indentation, a list item at the wrong level, duplicate keys, or an unexpected value type may only trigger an error farther down. If the file parses but can’t be enabled, check that references in proxy-groups match existing outbounds or other proxy groups, and that policy names and rule sets referenced by rules exist. For subscription-generated configurations, reproduce the issue on a backup and make lasting changes in the provider’s template or a client-supported override layer. Editing a cached file directly is likely to be undone at the next update.

If the main profile refreshes but the node list or rules don’t change, check whether proxy-providers and rule-providers have separate URLs, update intervals, or caches. These resources may not update with the main profile. Check their most recent successful update and confirm they’re referenced by a proxy group or rule. After fixing the issue, update once, confirm the client has enabled the new profile, then send a request that should match the relevant node or rule. For the basics of importing a subscription, see the quick start guide. If the profile loads but requests still take the wrong route, return to connection troubleshooting.

Slow speeds: separate time to first byte, throughput, and intermittent stalls

Keep test conditions consistent and distinguish latency from transfer rate

First pinpoint where the slowdown occurs. A long wait before a webpage opens can mean delays in DNS resolution, connection setup, the TLS handshake, or the server’s response. If a download has started but the transfer rate is low, focus on sustained throughput. For occasional video stalls, look at fluctuations, buffering, and concurrent traffic. Test the same legitimate destination several times on the same device and network, using the same app and proxy method. Cached page loads aren’t comparable to first visits. Don’t run system updates, large syncs, or multiple video streams during a speed test.

For each test, note the actual outbound and matched rule on the Connections page. A webpage may request content from the main site, image hosts, and static resource domains; a different outbound for just one of them can slow the whole page. Use the browser’s Network panel to find slow requests, then look them up in the client by domain and timestamp. Don’t attribute the page’s total load time to the proxy group name alone. Record results for each test destination separately: several sites slowing down at once points to a different cause than one site slowing at a particular time.

Choose the next step based on timing

The commands below compare a direct connection with the local HTTP proxy. The second command assumes the mixed port is 7890; replace it with the port shown in your client. On Windows, run curl.exe explicitly in PowerShell. Keep the other arguments the same. The commands discard the downloaded data and print the total request time and average download speed. The example page is small, so it’s useful for checking wait time, not available bandwidth. To compare throughput, use the same file that you’re authorized to access and that’s large enough to transfer for a while.

curl -sS --noproxy "*" -o /dev/null -w "first=%{time_starttransfer} total=%{time_total} bytes_per_second=%{speed_download}\n" https://example.com/
curl -sS --noproxy "" --proxy http://127.0.0.1:7890 -o /dev/null -w "first=%{time_starttransfer} total=%{time_total} bytes_per_second=%{speed_download}\n" https://example.com/

On Windows, replace /dev/null in the command with NUL. For a direct baseline, turn off TUN first; --noproxy only controls whether curl uses an application-level proxy and doesn’t change system routing. Check the connection record to see whether the second command still uses DIRECT after passing through the core. If the first byte takes a long time but the transfer is otherwise normal, check DNS and the handshake. If the first byte is quick but sustained transfer is slow, pin the outbound and run a longer transfer test. If the issue occurs only at peak times, record results from off-peak under the same conditions too.

Check local resource use and traffic capture

During a download, check resource use in Task Manager or Activity Monitor for the client, browser, and sync apps. Very verbose logging or another app saturating the upload can affect interactive requests first. Before testing, restore the usual log level and pause sync tasks you started. Then compare the system proxy and TUN on the same outbound; don’t also change the protocol, rule mode, and node. If a particular app only has problems with TUN, check its transport, whether the route covers the destination, and whether the client documentation lists any relevant limitations.

Don’t rely on a single best result to call the issue fixed. Revisit the destination that was slow and confirm that both time to first byte and sustained transfer meet your needs. Then resume background tasks and see whether concurrency brings the problem back. If two independent outbounds are slow only on one service, check that service’s response, download region, and client cache first. If the same outbound is slow across several unrelated destinations, share the comparison results with your provider. For traffic capture scope, see TUN mode vs. system proxy.

DNS issues: identify the resolver, upstream, and returned result

Find out which component is resolving the domain

Copy the failed domain from the log and determine whether it’s the destination, a node server, or the DNS upstream itself. If the node domain can’t be resolved, the request hasn’t reached that node yet. If the upstream server’s hostname can’t be resolved, investigate the resolver path used to look up that server. Meanwhile, the browser’s secure DNS, system resolver, and mihomo’s built-in DNS may each take a different path. A successful system command only proves that command’s query path works; it doesn’t prove the browser, TUN, or proxy outbound used the same result.

With TUN off and the network at its baseline, run nslookup example.com to check whether the default resolver responds, then repeat the test for the domain that fails. Note the DNS server, record type, and response status. Restore the original settings, send a new request from the affected app, and check the core log. If only the browser fails, check whether secure DNS conflicts with internal DNS requirements and compare with an app that uses the system resolver. If both the OS and browser fail, check whether the network provided the expected DNS server.

Understand empty responses, timeouts, and fake IPs

NXDOMAIN means the responding resolver says the domain doesn’t exist. Check the spelling and whether the name is only available on your organization’s internal network. A missing record of one type is different from a timeout affecting the entire query. For timeouts, first check whether the configured upstream is reachable from the current network and outbound. If needed, check whether the hostname required to reach that upstream can be resolved in the first place. Don’t send all internal DNS queries to a public resolver just to restore public domains; internal names may stop resolving or leave their intended lookup scope.

With enhanced-mode: fake-ip, the core can return a mapped address first, then identify the domain from that mapping when the connection follows. An app seeing a mapped address doesn’t mean DNS is broken. Check the traffic capture path and fake-ip-filter only if the app bypasses the core and uses that address directly, or if a device that needs real addresses—such as for device discovery or LAN services—is affected. Test the specific name first instead of switching the global DNS mode; changing modes can also affect caches and domain-based rule matching.

Test the local DNS listener with a separate snippet

The example sets up a listener port for local testing only. Merge it into the existing dns section of a backed-up configuration; don’t add a second section with the same name. This uses a public resolver for comparison, so test public domains only if your network permits and can reach it. Don’t use it to look up internal names. If another app is using the test port, choose a free one and update the query command too. This snippet doesn’t change system DNS; restore the original configuration after testing.

dns:
  enable: true
  listen: 127.0.0.1:1053
  enhanced-mode: redir-host
  nameserver:
    - 1.1.1.1

After loading the configuration, run dig @127.0.0.1 -p 1053 example.com A on a device with dig installed. A reply proves only that the local listener can reach the selected upstream. It doesn’t prove an app is using that listener or that node domains use the same resolver. In the real configuration, check that nameserver for regular queries, nameserver-policy for domain-specific upstream selection, and proxy-server-nameserver for proxy node domains all match the intended design. Change one layer at a time, then send a new request and check both the DNS result and matched rule.

System proxy not working: check the listener, system settings, and app behavior

Confirm the local proxy port is responding

The client’s System Proxy toggle writes proxy settings to the OS; the kernel listener handles incoming requests. Either can work while the other fails. Check the interface and active configuration for mixed-port rather than assuming a port from another guide. Use the command below to specify an HTTP proxy explicitly; on Windows, you can use curl.exe instead of curl. This bypasses the app’s automatic proxy selection, but does not change the kernel’s rule mode. If the explicit request also fails, check the listener and outbound connection before changing system proxy scripts.

curl -v --connect-timeout 5 --noproxy "" --proxy http://127.0.0.1:7890 https://example.com/

If the connection to 127.0.0.1 is refused, check whether the core is running, the address and port match, and another proxy app hasn’t claimed the port. Don’t confuse the mixed port with a SOCKS-only port or the control interface. If the local connection succeeds but the core then returns an error, system proxy settings aren’t the bottleneck in this test; check the client log next. If the command succeeds and the connection is recorded, check system settings to see which proxy configuration the app is supposed to use.

Check the scope of settings for your operating system

PlatformWhere to checkEasy-to-miss scope
WindowsSettings → Network & Internet → ProxyUser proxy settings and WinHTTP-based programs may use different configurations.
macOSSystem Settings → Network → Current service → Details → ProxiesWi-Fi, Ethernet, and other services may each have their own proxy settings.
LinuxDesktop environment proxy settings, app settings, and terminal environmentDesktop apps, terminal tools, and background services may each use different values.

On Windows, compare the port in system settings with the one shown in the client, and check whether an automatic script and manual proxy are both configured. To inspect WinHTTP, run netsh winhttp show proxy, but don’t use it as a substitute for checking the user proxy page. If only one app restricted by system policy fails—for example, some apps that use app containers—first check whether it tries to connect to a local loopback address and whether the app and your organization’s management policies support that setup. Don’t reset the entire network because one app fails.

On macOS, after switching network services, check the Web Proxy and Secure Web Proxy settings and exception lists again. On Linux, apps launched from the desktop may use desktop proxy settings, while terminal tools often read http_proxy, https_proxy, and no_proxy. Existing terminals don’t automatically inherit environment changes made later, so start a new process for each comparison. Check environment variables locally and avoid sharing proxy values with credentials in logs.

Check app settings and test with the proxy both on and off

Check browser proxy extensions, the app’s Use system proxy setting, and its bypass list. Some programs make their own connections and ignore system settings; others read the settings but bypass the proxy for the domain in question. First test with a browser that supports the system proxy. With the setting on, you should see a new connection in the client; with it off, the browser shouldn’t keep sending the same requests to the local proxy port. Then test the affected app. If an explicitly configured proxy works but automatic detection doesn’t, changing the app’s proxy setting is more direct than repeatedly switching core modes.

If you need to capture traffic from apps that don’t use the system proxy, test TUN separately by following the guide and noting the required permissions and scope. When you’re done, restore any existing organization scripts and exception lists. Before closing the client, use its normal shutdown process to remove the temporary proxy and confirm that internet access works afterward. If a policy automatically restores system settings, record the before-and-after values and contact your administrator rather than repeatedly overwriting them. For permission issues after installation, see macOS network extensions and Keychain.

Client crashes: distinguish UI exits, core termination, and startup failures

Record what triggered the failure and which processes are still running

Start by describing a reproducible action: does the app exit as soon as you open it, crash only when you open the profile page, freeze after loading a YAML file, or leave the window open while all connections stop after you enable TUN? Check the tray and system process list to see whether the UI and core are still running. If only the core has stopped, the interface may still show stale status. If the window has disappeared but the core is running, the system may still send requests to a leftover listener. Before reproducing the problem, check system settings to make sure the proxy isn’t stuck on an address that no longer works.

Save the full log from startup through the failure, not just the last line. On Windows, check the application events in Event Viewer by time. On macOS, find the crash report in Console. On Linux, launch the app from a terminal or check the relevant service logs. Include only the errors, affected process, and steps from the same incident. A permissions issue or a process killed for lack of resources calls for a different fix than a YAML validation error. Run only one client instance during testing to rule out multiple processes competing for a port or working directory.

Start without traffic capture, then restore settings one at a time

If the interface still opens, turn off launch at startup, the system proxy, and TUN. Disable automatic loading of the profile that triggers the problem, then quit and reopen the client. Back up subscriptions and user overrides; remote subscriptions may also be stored in the app’s data. Before using the client’s recovery or reset option, check what it removes. If you need to isolate app data, back up and temporarily move only that app’s user data directory so you can restore it. Don’t delete system-wide service directories. Start in a clean state without importing subscriptions, and check only that the interface opens and closes.

Once the interface is stable, import one known-good profile instead of restoring the entire old directory. Check the load log for unsupported fields, missing rule resources, or duplicate ports. If only the original profile fails, restore local overrides one section at a time until you isolate a reproducible change. If the problem occurs only with TUN enabled, check service or network extension permissions, whether an old instance is still running, and whether device management restricts traffic capture. Keep system protections enabled. Grant necessary permissions only to a trusted installation through the normal system process; running everything as administrator isn’t a routine fix.

Check compatibility and upgrade requirements before reinstalling

If the app still won’t open in a clean state, check that the installer matches your operating system, processor architecture, and distribution. The app interface and bundled core need to come from compatible releases. If the issue began after replacing a single executable, undo that change first. To choose another installer, use the downloads page and select your platform. If available, Clash Plus is the recommended option; Linux users can also consider Clash Verge Rev or FlClash. Archived clients that are no longer maintained can help with older setups, but shouldn’t be the default replacement for troubleshooting. Before reinstalling, keep a copy of the reproducible configuration and original error so you don’t lose useful evidence.

Keep the verification steps consistent: start the interface, load a profile, make one connection, quit normally, then restart and confirm network settings have been restored. If the issue occurs only after waking from sleep, test that too. If it began after an upgrade, note whether the same override was used before and after and whether an old service remained. When reporting the issue, include the OS, architecture, client and core versions shown in the interface, the steps that trigger it, and a relevant log excerpt. “Won’t open” doesn’t distinguish an installer that never ran from a UI crash or a core that refused to load. Check the FAQ for common installation and configuration questions.

Mobile troubleshooting: permissions, background disconnects, and network changes

Confirm the system recognizes the connection, then identify which apps are affected

When an Android client uses VpnService to capture traffic, the system usually asks for explicit permission the first time it connects. After tapping Connect, check the system VPN settings to see which app is active and whether the client is still waiting for permission. If another VPN is already active, a work profile has management policies, or another app is set to always-on VPN, check the device’s management requirements before choosing a connection method. Don’t mistake a conflict for a node timeout: until the system establishes the tunnel, switching proxy groups only changes the client’s selection; it won’t send app traffic through the proxy.

On iOS, add a VPN configuration only when the system prompt matches the client you selected, then check its connection status in VPN settings. Managed devices may use a dedicated VPN or per-app connections, so confirm the intended scope before making changes. On either platform, send a request from an app that you know is included in traffic capture and check whether the client records a new connection. A VPN icon in the status bar only confirms that the system established a connection; it doesn’t guarantee that rules, DNS, and outbound routing are correct.

Test lock-screen, network-switching, and single-app issues separately

If the connection works with the screen on but drops after the device has been locked, compare behavior on the same network. Keep the app and node unchanged, and record whether a request succeeds with the screen on, after a short lock, and after a longer lock. Check whether the VPN status disappears and whether the client restarts. On Android, check the app’s battery optimization, background activity, auto-start, and data saver settings; names vary by device. Change permissions only for trusted apps that need to run continuously. Adjust one setting at a time and repeat the lock-screen test; you don’t need to disable power saving for the whole device.

If the connection drops only when switching between Wi-Fi and mobile data, start on one network, then switch once and send a new request. A dropped existing connection doesn’t mean the tunnel can’t reconnect. Check how long new requests take to recover on the new network and whether DNS still fails after reconnecting. Complete the normal sign-in process before using public Wi-Fi. If the issue occurs only on mobile data, check the app’s cellular data permission and whether the node and DNS upstream are reachable on that network. If it occurs only on home Wi-Fi, check for conflicts between local IP addresses and VPN routes.

Check per-app routing and the block-without-VPN setting

If only one app is affected, check whether it’s included in per-app proxy settings. An allowlist includes only selected apps; a blocklist excludes selected apps from traffic capture. The two lists work in opposite ways. After changing a list, rebuild the connection as prompted by the client; don’t test using an existing session. On Android, if Block connections without VPN is enabled, the system blocking network access while the VPN is disconnected may be expected. Focus on restoring the intended VPN connection and background operation; don’t turn off a protection policy the device needs just to get temporary access.

If a mobile device reports a DNS error, compare Private DNS, the app’s own resolver, and the client’s built-in DNS. Note the original settings, then follow the DNS section to check the queried domain and upstream. Changing the network, resolver, and node all at once makes the original problem difficult to reproduce. After fixing it, verify recovery from a locked screen, one network switch, and one included and one excluded app in the per-app list. For Android background permissions, see VpnService and battery optimization settings. If you need to reinstall, choose a client for your device from the Android downloads or iOS downloads.