Troubleshooting

Clash Troubleshooting Guide

For your first install, config import, and connection check, start with the quick start guide. If the client opens but you get stuck at a particular step, find the matching symptom below. After fixing the issue, return to the guide and repeat the connection test with the same app and URL.

1. No Internet: Restore Basic Connectivity First

Find where the connection breaks

Don't reinstall yet. Note when the problem started, which config is active, the proxy mode, and what changed recently. Open a site that normally works without a proxy, then test with another app for comparison. If only one site fails, check its error message and connection log. Treat it as a device-wide outage only if the browser, email, and system updates all fail. A Wi-Fi icon means the device is connected to an access point, not necessarily to the internet. Guest Wi-Fi may also require a sign-in page; if it doesn't appear, open it from your system's network notification or settings.

Before testing a direct connection, pause apps and tasks that shouldn't bypass the proxy. Turn off the client's system proxy and TUN, quit the client, then check whether the system's manual proxy and automatic configuration script have returned to their previous state. Don't remove a proxy configured by your organization; ask your administrator first. Reopen the test site, and don't rely on an old page that may be available offline. If another device on the same network also fails, check the access point, sign-in requirements, or upstream network first. If only this device is affected, check its assigned network address, leftover system proxy settings, and security software alerts.

Restore access one layer at a time

Once direct access works, start the client and check that the active config loaded and the core is running. On desktop, enable only the system proxy, trigger a new browser connection, and look for the destination domain in the connection list. Don't enable TUN at the same time: changing both entry points makes it hard to tell whether the app bypassed the proxy or the core chose the wrong route. If the browser still errors but a connection appears in the list, open its details to see the matched rule, proxy group, and actual exit node. A DIRECT rule means the core is making the connection directly; it doesn't guarantee that the destination is reachable without a proxy.

If webpages work with the system proxy but the whole device loses internet when you enable TUN, turn TUN off and keep the working connection. Then look for the earliest log entry about virtual interface creation, route updates, or permissions. Check whether another VPN is running or whether you recently switched from wired to Wi-Fi. Re-establish the app's connection between tests when possible; browsers and messaging apps reuse existing sessions, which may not move to the new route. For apps running long tasks, wait for them to finish before quitting and reopening. Don't judge the fix by an interrupted transfer.

Choose the next check based on the error

Test resultCheck firstNext step
Still offline with proxy interception offNetwork access, sign-in page, leftover system proxyTest another device on the same network
Fails with interception on; connection list is emptyApp proxy settings, local listening port, or TUN routeCheck how apps reach the core
Connection appears, but DNS lookup failsCore DNS logs and upstream resolversTell system DNS apart from core DNS
Connection appears, but the selected exit failsNode selected by the proxy groupCompare one node with others in the group

After the fix, repeat the action that originally failed in the same app, then test a known-working site for comparison. Finally, quit and restart the client to confirm that the system proxy and routes are restored correctly. If things work only after a restart and fail again after waking from sleep, record the steps that reproduce the issue. Focus on whether the client recreates its listener or virtual interface after a network change; don't mistake a temporary recovery for a lasting fix. If just one site still fails, keep the system settings you've confirmed work and narrow the issue to that domain's rule, DNS lookup, or exit node.

2. Node Timeouts: Test Latency and Real Connections Separately

Identify which step is timing out

A latency test checks whether a node can reach a specific test URL; it isn't a regular system ping to the proxy server. A test may involve resolving the node address, connecting to the proxy server, completing a protocol handshake, and reaching the test site. Any step that exceeds the timeout can produce the same error. Check the log entry closest to the test time, then use that node to open a real public webpage you need to access. If the page loads but the same test URL fails on several nodes, check whether the test URL is still responding or redirecting in a way the checker doesn't handle.

Conversely, a latency result doesn't mean every kind of traffic will work. Many checks make one short HTTPS request and don't test UDP, persistent connections, or services that require a particular exit location. If a browser can reach the speed-test target but a meeting app can't connect, check the app's protocol and connection logs instead of treating the latency result as proof that everything works. To test a node manually, pause automatic selection and pin one exit for the whole test. An automatic group may switch nodes after a health check within seconds; without pinning an exit, you can't know whether both tests used the same route.

Narrow down the scope of the problem

If only one node fails, pin another previously working node in the same group and keep the app and URL unchanged. If the other nodes in that group work, there's usually no need to change global DNS, the system proxy, or routes. The node's port may have changed, the node may be disabled, its route may be temporarily unreachable, or your device may still have an old config. Check the config page for the subscription's last update and which config is active, then retest with a valid config from the provider. Don't copy handshake parameters from one node to another; nodes with similar names may have completely different server settings.

If every node fails, start with the basic connectivity checks, then test the same node on another trusted network. If it fails on the original network but works elsewhere, compare network sign-in requirements, DNS resolution, and network-side policies. If it fails on both, check your account, provider announcements, and whether the config supports the running core. If only nodes using one protocol fail, look for a clear protocol compatibility or parameter parsing error. If the core hasn't loaded the config, stop running latency tests and fix the config loading issue first.

Use the log to pinpoint when the error occurs

i/o timeout in a log means an operation didn't finish within the allowed time. If it appears next to a DNS query, check name resolution first. If it follows a connection to a proxy server address, check connectivity to that address. connection refused usually means the connection was explicitly rejected; determine whether the rejection came from the local proxy port or the remote node port. If a certificate date is invalid, check the device clock and time zone first. If the certificate still doesn't match, verify the subscription source and settings. Don't disable certificate verification to make a test pass.

When retesting, make one real request, then establish two or three new connections in a row to see whether the same step fails consistently. If a timeout happens once and everything works afterward, note the time and network; there's no need to change every group setting immediately. If the first connection is always slow but later ones are fine, investigate the initial DNS lookup or handshake. If results still look unchanged shortly after switching nodes, refresh the connection list and make sure you're looking at a new request. When reporting the issue, include the time, network type, affected nodes, whether the test matches real-world access, and the first error with sensitive details redacted. That's more useful than a screenshot showing every node in red.

3. Subscription Errors: Separate the Request, Parsing, and Activation

Request failed? Start with the status code

Update just that subscription from the config page; don't delete the current config first. Note whether a manual update fails immediately, takes a long time to fail, or only scheduled updates fail. For 401 or 403, sign in to the provider's website and check whether the subscription expired, its URL was reset, or authentication is required. A 404 may mean the link is invalid or that part of the path was missed when copying it. A 429 means requests are being rate-limited; stop refreshing and wait as the provider advises. If the server returns an error, record the status code and time, keep the existing config, and try again once the provider is back up.

If there's no HTTP status code, first determine whether DNS resolution, the connection, or the TLS handshake failed. Being able to sign in to the website in a browser doesn't mean the client can fetch the subscription: they may use different network routes or system credentials. New devices can also get stuck in a dependency loop: downloading a subscription requires a working network, but the client doesn't yet have a usable config. In that case, use a trusted network that can reach the provider, or import a locally saved config as the provider instructs, then compare the results. Don't give a private subscription URL to an unfamiliar conversion site or test it with an online tool that may log requests.

A successful request doesn't mean the response is a config

If the request returns 200 but parsing fails, check what was actually returned. A login page, network sign-in page, maintenance notice, or ordinary JSON response can all arrive with a success status. A webpage showing a list of share links doesn't mean the client can load it as Clash YAML. Choose a compatible export format on the provider's config page; don't just rename arbitrary downloaded content to .yaml. If you're importing a proxy provider on its own, the client usually needs provider data, not a main config with routing rules, ports, and mode settings. These may have different import options.

If you maintain the YAML yourself, check a few lines before the line number reported in the log. List items, mapping indentation, and spacing after colons are common sources of errors; use spaces for indentation. Valid YAML can still fail core validation: a rule may refer to an undefined proxy group, or a group may reference a provider name with different capitalization. If the error mentions an unknown field or unsupported proxy type, check compatibility with the active core. Don't delete settings you don't understand one by one; removing group references or fallback rules can change the exit used by every app.

Updated but not active? Check which config is in use

After a successful update, check which config the client marks as active. Give configs names that don't contain private information, perhaps based on their purpose, then select the updated one again. Make a new request in the connection list and check that the matched rule and proxy group reflect the config. If the config shown in the list is up to date but traffic still uses the old exit, the core may not have reloaded, global mode may be overriding rules, or the app may be reusing a connection established before the switch. Check the load log first, then clear the test app's old session. Repeatedly refreshing the subscription won't fix this.

If manual updates work but scheduled ones fail, check whether the device was asleep or offline, or the client wasn't running at the time. Confirm the update interval and its units, and make sure automatic updates are enabled for that subscription in the UI. For personal changes to a remote config, prefer the client's supported override feature and compare the result before and after an update. Keep temporary changes in a local copy; don't mistake a sync overwrite for lost client data. If you have several configs, use the profile management notes to organize their sources, names, and purposes. Once everything is stable, remove unused copies so you don't accidentally switch back to old rules.

4. Slow Speeds: Measure Each Part of the Wait

Tell slow starts, low throughput, and stalls apart

Test one kind of activity at a time. If a webpage sits blank for a long time and then loads quickly, check DNS resolution, connection setup, and time to first byte. If a large download starts normally but stays slow, look at exit bandwidth, network congestion, and rate limits on the destination. Meetings and voice calls are affected mainly by packet loss, jitter, and buffering; a high peak download speed doesn't rule those out. Write down whether the problem affects the first screen, the whole page, a download, or a live session. Then pick a repeatable test target instead of comparing numbers from different apps and sites.

Compare results on the same device, against the same target, at roughly the same time, changing only one variable. For example, keep the node fixed and test over wired and wireless connections, or keep the network fixed and compare two candidate nodes. Re-establish the connection after changing settings so you don't reuse the previous session. Pause cloud sync and large downloads, and note whether the problem happens only in the evening or with specific sites. If every device is slow on the same Wi-Fi network and performance improves near the access point, troubleshoot the local wireless link first; there's no need to change the app's routing rules.

Use the command line to inspect each request stage

The example below uses a public test site. Run it in a terminal with curl installed. First, check the client's actual mixed port; this example assumes the local HTTP proxy listens on 7890. Replace it with your actual port if different. On Windows, type curl.exe explicitly to avoid the older PowerShell alias. In the second command, replace the output device with NUL on Windows. The first command explicitly bypasses any proxy set through environment variables, but traffic may still be intercepted if TUN is on. For a true direct-connection comparison, first restore the direct setup as described in the no-internet section.

curl --noproxy "*" -sS -o /dev/null -w "dns=%{time_namelookup} tcp=%{time_connect} tls=%{time_appconnect} first=%{time_starttransfer} total=%{time_total}\n" https://example.com/
curl --noproxy "" -x http://127.0.0.1:7890 -sS -o /dev/null -w "dns=%{time_namelookup} tcp=%{time_connect} tls=%{time_appconnect} first=%{time_starttransfer} total=%{time_total}\n" https://example.com/

Times are in seconds and accumulate from the start of the request; they aren't measured independently for each stage. The time to first byte minus TLS completion roughly shows how long the server took to respond after the handshake. Total time minus time to first byte mostly reflects the remaining response transfer. Through a local HTTP proxy, the connection time may only measure the connection to the local listener, not to the remote node. The DNS field also can't tell you how long the proxy took to resolve the destination. Use the core logs to understand what happened next. The test site's response is small, so these commands help identify where the wait occurs; they don't estimate sustained large-file bandwidth.

Change the rule or exit only after finding the bottleneck

If the same site repeatedly has a slow time to first byte through a fixed exit, try another candidate exit while keeping everything else unchanged. If only one site is slow, open the connection details and check whether it and its related resources use the expected exit. A page's main domain and its image or API domains often differ, so changing only the main domain's rule may not improve the whole page. Check the existing rules in top-to-bottom match order, then edit a local copy. If needed, see how to write routing rules. Once verified, keep the change in an override location supported by the client.

If large requests tend to stall only under TUN, test the same app using the system proxy, then check whether the issue depends on a particular network or destination. Packet size along the route, transport protocols, and network congestion can all cause similar symptoms. Don't copy another device's interface MTU setting without checking. Keep the original value, confirm that the problem consistently occurs only with a particular interception mode, then test changes one at a time using the core and platform documentation. Judge the fix by whether the original task completes reliably, not by a single low latency or high download speed.

5. DNS Issues: Find Out Which Resolver Is Being Used

Compare system, browser, and core DNS results

A system lookup can return an address while the browser still fails. The browser may use its own secure DNS or a cached result; when connecting through a proxy, DNS resolution may also be handled by the core or a remote resolver. Note the failing domain and app, make a system lookup and an app request around the same time, then compare them with the core connection log. If only one browser fails, check its DNS, proxy, and cache settings first. If the problem occurs only with TUN enabled, check how the client intercepts DNS. The address shown in the system network settings doesn't prove which upstream resolver handled the query.

Use nslookup example.com to see which server handled a regular DNS query and what it returned. Once you've confirmed which server you need to test, compare it with nslookup example.com 1.1.1.1; on a managed network, use a resolver approved by your administrator. This command doesn't make an encrypted DNS request like a browser does, and DNS interception may redirect it. If you see NXDOMAIN, check the spelling and lookup scope. If requests repeatedly time out, check the connection to the upstream resolver first. If you get an address but HTTPS reports a certificate error, don't classify it as a DNS problem or ignore the certificate warning.

Isolate upstream differences with a minimal config

The following mihomo DNS snippet is for comparison, not a complete config. Copy your working config first, then merge the snippet using a method supported by your client. If a dns section already exists, edit its fields instead of adding another section with the same name. This example is for networks that can reach the public resolver shown. Don't override administrator settings on a corporate or campus network with dedicated DNS requirements. Keep the error log before restoring the original value so you can tell whether the original upstream was unavailable or switching DNS modes made the difference.

dns:
  enable: true
  enhanced-mode: redir-host
  nameserver:
    - https://1.1.1.1/dns-query

redir-host returns the resolved address. fake-ip can return a mapped address for matching queries, which the core later uses to recover the domain when a connection is made. That mapped address isn't the website's real address, so don't use it for external connectivity tests. If mapping is enabled but a connection bypasses the core, the app may try to use an address it can't reach. After switching modes, reopen the test app and clear the relevant cache if needed, so the next test doesn't reuse an old mapping. If only a few local domains are affected, check local compatibility settings instead of changing the global mode.

Check bootstrap DNS, internal domains, and address families

If an encrypted DNS upstream is configured by hostname, the hostname itself must be resolved first. Check whether the current config has a working bootstrap resolver; mihomo's default-nameserver can resolve DNS server hostnames. If a node address is also a hostname, check whether proxy-server-nameserver specifies a separate resolution path. A loop can occur if the resolver is reachable only through a node whose address depends on that same resolver. Keep an independent working path for bootstrap lookups, then check routing for regular queries. Don't try to solve the problem by piling on more upstream addresses.

An internal site failing to resolve on a mobile hotspot may be expected: its name may be visible only on an organization network or an authorized VPN. Don't send internal domains to public DNS services. Reconnect to the authorized network and check whether the local resolver handles the relevant suffix. If connections stall only after an IPv6 result appears, check separately whether the device has a working IPv6 route and whether the app falls back to IPv4. Disabling IPv6 may hide the symptom, but it doesn't prove DNS is the cause. Test a regular public domain, the original failing destination, and any internal domain you actually need to make sure one fix doesn't break another.

6. System Proxy Not Working: Check the App's Entry Point

The switch is on—but is traffic getting through?

The system proxy is generally used by apps that follow the operating system's proxy settings; it doesn't automatically intercept all network traffic. After enabling it in the client, check the local address, port, and bypass list in the operating system settings. Make a new browser request and look for the domain in the connection list. If it appears but uses a direct exit, the entry point may be working; check the proxy mode or rule. If it doesn't appear at all, check the app's own proxy settings, system bypass entries, and existing connections. Don't use the exit address shown by one website as proof that all device traffic is being intercepted.

On Windows, some services and command-line tools may not follow desktop proxy settings. On macOS, check that the setting was applied to the active network service, not an inactive interface. Linux desktop environments, terminal processes, and background services may each get their proxy settings from different places. For example, environment variables set in a terminal usually affect processes started from that terminal afterward; they don't change settings for a running desktop app or a standalone service. If environment variables, app settings, and the system proxy are all configured, first find out which one the app actually uses before changing anything.

Test the listener port and automatic configuration scope

Check the mixed port in the client settings, then compare with the curl command that explicitly uses the local HTTP proxy. If it works, at least the local entry point, core, and route to that destination are working. Check whether the app follows system settings. If the explicit connection is refused, verify the address and port, make sure you haven't confused the proxy listener with the control interface, and confirm the core is running. An open client window doesn't mean the proxy port is listening. If the client provides a SOCKS-only entry point, don't test it as an HTTP proxy.

When manual proxy settings and an automatic configuration script are both present, check which one the system and app use. Some proxy scripts bypass local hostnames, internal addresses, or certain domain suffixes. If only those destinations are missing from the connection list, that bypass may be intentional. Don't clear the entire bypass list just to make entries appear; that could route printing, device management, or internal services through the wrong exit. On managed devices, a policy may set the proxy and automatically restore it after changes. Ask your administrator which settings are allowed instead of repeatedly overwriting managed configuration.

When to use TUN and when to keep the system proxy

If browsers and other main apps follow the system proxy, keeping that entry point makes troubleshooting easier. Consider TUN only when an app bypasses the system proxy and you need to intercept its traffic within your authorized scope. Before switching, check the client's permission requirements, make sure another VPN isn't using the virtual interface, and record the current working settings. TUN sends traffic to the core, but rules still choose the exit; it doesn't automatically mean global proxy mode. The system proxy can also route traffic by destination when rules are enabled. For differences in how the two work and handle DNS, see TUN vs. system proxy: how they work.

Verify the fix in two passes. First, test only the affected app: reopen it, make a request, and confirm it uses the right entry point and matches the expected rule. Then test cleanup: finish any tasks that need the proxy, quit the client normally, and confirm the system isn't still pointing to a closed port. If proxy settings are left behind only after a crash, but not after a normal exit, focus on shutdown order, client crashes, and startup behavior rather than changing working rules. If a command-line tool only needs a temporary proxy, use the tool's documented option to specify an entry point for that command instead of changing the device's default network settings.

7. Client Crashes: Isolate the UI, Core, and Config

Note exactly where startup fails

Separate three scenarios: the window closes immediately after you click the icon; the UI opens but reports that the core isn't running; or the client exits only after you import a config or enable TUN. For the first, start with system application and client startup logs. The second is more likely to involve the core executable, working directory, port, or config. For the third, reproduce the specific action instead of repeatedly restarting. A tray app may have closed its window without quitting; check the tray or system process list to see whether it's still running before deciding that it crashed.

Before reproducing the issue, disable startup launch to avoid multiple instances or an immediate repeat when the system starts. Record the operating system, device architecture, client name, action that triggered the issue, and the earliest error. A string of shutdown messages at the end is usually just a consequence. On Windows, check application events at the relevant time. On macOS, look for the related crash report in Console. On Linux, check terminal output or service logs based on how the client starts. If a system notification mentions a missing runtime component or unsupported device, follow the release instructions first; don't assume every startup failure comes from the config file.

Keep user data and test in a clean environment

Back up the config directory and personal override files first. Find the directory using the client settings, project documentation, or application logs; don't guess based on another client's paths. Fully quit the UI and confirm no background process is reading or writing files. If the client supports a fresh config environment, start with default settings in one. If the documentation explicitly says renaming the config directory lets the app recreate it, rename it and keep the original instead of deleting it. If the default environment starts, restore only the configs you need, one at a time. Restart after each one to find out whether the trigger is a config, provider, or local setting.

If the log says address already in use, find out whether the conflict involves the proxy port, control port, or another listening address. Check for another client or an old process still running; if you confirm it's your own duplicate instance, quit one of them normally. If an essential service is using the port, choose another available port in the client and update the system proxy and app settings to match. For permission errors when writing files, check the specific directory and installation method. Don't open the entire data directory to every user or treat running with elevated privileges as a routine fix.

Reinstall for the right architecture; restore settings gradually

If you need to reinstall, choose the package for your platform from the download page. If you want a different client, start with Clash Plus on supported platforms; for Linux, see the recommended Clash Verge Rev, then check the client guide. On Windows, match the package to your system architecture. For macOS, choose Apple Silicon or Intel. On Linux, check the distribution's package format too. Reinstalling the same app often keeps user data, so an old broken config won't be fixed by installing over it. If the system blocks the app, check its source, installation requirements, and permission prompts; don't disable system protection just to run it.

If the problem started after an update, check whether the config structure needs migration and whether the old and new installations share a data directory. If the project documents a rollback procedure, test with a backed-up old config and a compatible package; don't let the old version read data that has already been migrated. Once the default setup runs reliably, restore settings in this order: subscription, overrides, system proxy, TUN, and startup launch. If a problem returns, go back one step instead of restoring every switch at once. If a clean environment still crashes, report the shortest steps to reproduce it and a redacted system error. That's more useful than handing over a whole config directory containing private subscriptions.

8. Mobile Troubleshooting: Permissions, Background Activity, and Network Switching

Confirm VPN permission before the first connection

On Android, clients built on VpnService usually prompt for VPN permission the first time they start. If you tapped Cancel, the client UI may still work, but traffic won't enter its virtual interface. Try connecting again and confirm in system settings that the client you're using is active. On iOS, the first connection may also require approval to add a VPN configuration. If you're not sure which app a configuration belongs to, check its name in system settings first. Don't remove a work-managed configuration yourself. If you use a work profile or another VPN, check whether your organization's policy allows this setup.

If you've granted permission but apps still can't open pages, don't reinstall right away. First check the active config and node, then make sure the app isn't excluded from interception. Some Android clients offer per-app allowlists or exclusion lists; these work in opposite ways. Seeing an app icon in a list doesn't mean it's using the proxy. Also check whether Android has Always-on VPN or Block connections without VPN enabled. If the system requires a VPN that's not running, the whole device may appear offline. Record the original settings before changing anything, and ask your administrator about managed options.

Works with the screen on, disconnects a few minutes after locking

Use a repeatable test to confirm the timing: connect with the screen on, lock it for a few minutes, then wake the device and check the system VPN status before looking for a reconnect message in the client. If the VPN indicator disappears or the process restarts, check Android's battery restrictions, background activity permissions, and auto-start settings for that app. Change one setting at a time and retest; you don't need to disable power saving across the whole device. Some systems stop services when you clear recent apps, so note whether you did that during testing. If you turn off notifications and no longer see a persistent status message, that doesn't necessarily mean the VPN disconnected; check the system VPN status and make a real request.

On iOS, don't follow Android battery-whitelist instructions. Check the VPN status, the connection settings provided by the app, and whether another configured VPN started around the same time. If only one app spins after returning to the foreground while the system VPN remains connected, try opening a new session in that app. An interrupted old session and an exited VPN service can both look like a hang, but reopening the app may fix the former. For the latter, check system and client logs. For Android, see the notes on VpnService permissions and battery settings.

Fails only when switching between Wi-Fi and mobile data

Test the same config on a stable Wi-Fi network and on mobile data separately. Confirm that each works on its own before testing a switch between them. When the network changes, the device's address and default route change too; downloads and calls in progress may need to reconnect. Check whether new requests work once the VPN is back. If only existing requests are interrupted, the issue may be session migration. If new requests also keep failing, check whether the VPN reconnected, DNS recovered, and the current node can complete its handshake. If the issue happens only on public Wi-Fi, complete the network sign-in first, then enable interception and test again. Don't mistake the sign-in page for a subscription server response.

If you can access the internet after switching networks but can't reach a printer or storage device on the same Wi-Fi, first confirm that your phone is still connected to that network and that the app has the required local network permission. Then check the client's LAN bypass setting or rules. Don't confuse desktop's “Allow LAN” option with mobile access to local devices; the former usually controls whether other devices can connect to the local proxy listener. Keep a timeline during testing and check permission, lock-screen, and network-switch behavior separately. If you're still unsure where traffic enters, start with troubleshooting, then note the earliest failure under the matching symptom in this guide.