Clash Configuration and Connections

Clash FAQ

From importing a subscription to troubleshooting connections. When something goes wrong, check the active configuration first, then look for the first error in the logs.

Clash basics

Learn how clients, cores, and subscriptions fit together, then see how traffic enters Clash and which mode handles it.

How do the Clash client, mihomo core, and subscription work together?

The client is the interface for importing configurations, switching policies, and viewing logs. mihomo is the core used by some clients to read configurations and handle connections. A subscription provides the configuration and is usually maintained by the service provider. Installing a client does not include a subscription, and switching clients does not extend its validity. If the same configuration fails after migration, compare the core type and version on both sides, then check whether the fields in the error are supported.

When should I use Rule, Global, or Direct mode?

Use Rule mode when only some traffic should go through the proxy. The core checks rules from top to bottom and uses the matching rule's outbound; a catch-all rule usually goes last. Global mode sends connections handled by the core to the global policy group, with the actual outbound determined by the group's selection. It's useful for a quick comparison. Direct mode sends connections handled by the core straight out. Use it to check whether a node is the source of a problem, but note that it does not quit the client or disable the system proxy.

What's the difference between the system proxy and TUN mode?

The system proxy sets a local proxy address and port. Apps use it only if they respect the system settings. TUN routes traffic through a virtual network interface, making it useful for apps that ignore system proxy settings, but it can be affected by permissions, routing, and other VPNs. First use the system proxy to check whether your browser can connect, then enable TUN if needed. When troubleshooting, change one connection method at a time and check the connections list to confirm the target app's traffic is reaching the core.

Why does Fake-IP return an address that differs from the actual server?

Fake-IP assigns a temporary address to a domain. When an app connects to that address, the core uses the mapping to recover the domain and match it against the rules. The temporary address is not the site's public IP, so seeing it does not mean DNS resolution failed. If a printer, LAN service, or app needs the real address, first identify the exact domain it uses, then consider adding it to fake-ip-filter. Reconnect the app after making changes so stale DNS cache entries don't skew the results.

Getting Started: Choose a Proxy Mode →

Setup and configuration

Check whether the subscription downloaded successfully, the active configuration is enabled, and the required system permissions are in place.

Subscription update failed: how can I tell if the URL is no longer valid?

Try updating manually from the configuration page and check the error time and status. For a 401 or 403, check whether the URL was reset and whether your account is still active. For a 404, check the provider's site for an updated subscription URL. A connection timeout only means the request didn't finish in time; it doesn't prove the subscription has expired. Keep your current configuration if it still works, and switch only after the new one imports successfully. Subscription URLs may contain access credentials, so don't share them in public screenshots or support comments.

TUN won't turn on. Which permissions should I check?

Check the logs to see whether creating the virtual network interface failed or routing setup failed afterward. If your Windows client offers service mode, make sure the service is installed and running. On Linux, follow the client's instructions to check whether its current launch method has the permissions needed to configure the interface and routes. On mobile, make sure you've approved the system VPN connection request. If another VPN is running, disconnect it temporarily for comparison if possible. Don't permanently weaken system permissions just to enable the toggle.

Why are my proxy groups empty after importing a configuration?

Make sure the imported configuration is set as the active one, not just listed in the client. If a group uses use to reference an external node source, check that its name exactly matches the name defined in proxy-providers, then check the provider's update status. If the logs report a format error, check whether the download is a parseable configuration or a login or error page. Also check whether filters excluded every node. Fix the node source or filters first; there's no need to change routing rules yet.

How can I keep local changes from being overwritten when a configuration updates?

First identify what the client is running: a remote subscription, a locally imported copy, or a configuration combined from a subscription and overrides. Direct edits to a remote subscription may be replaced when it updates. If the client supports overrides, put the DNS, rules, or other keys you want to keep in a separate override and make sure it's linked to the active subscription. After updating, check the effective configuration, especially whether lists are appended or replaced in full. If overrides aren't supported, maintain a separate local copy.

Getting Started: Import a Subscription →

Tips and usage

Latency figures are useful for comparison. To see which route a connection actually takes, check the matched rule and outbound on a new connection.

Why are webpages still slow when node latency is low?

A latency test usually targets one probe address and measures how long that request took at that moment. Loading a webpage also involves DNS lookups, connection setup, and downloads from multiple domains. When reproducing the issue, check the connections list to see which policy group and node the page actually used, then compare two nodes on the same page and network. If only the first load is slow, look at DNS resolution and connection setup. If it starts normally but large downloads stay slow, compare sustained transfer performance.

How can I see which routing rule matched a domain?

Stay in Rule mode, close the target page, then make a fresh request and find the new connection by domain in the connections list. Note the matched rule, policy group, and final outbound. A page may also connect to domains for static assets or sign-in, so don't check only the main domain in the address bar. If a matching rule exists but the catch-all is used, check whether the rule set loaded and whether an earlier, broader rule already matched the request. Reconnect after changing rule order; existing connections may keep using their original outbound.

Which policy group should I use: manual selection, automatic testing, or failover?

Use select to switch between outbounds manually, url-test to choose based on probe results, and fallback to prefer a specified route and try others in order if its probe fails. Automatic groups use the configured probe URL, which may not reflect how well a target site works. You can first use a manual group to confirm that each node can reach the service, then decide whether to enable automatic switching. After switching, check a new connection to confirm its final outbound instead of relying on the group name.

How can I restrict access when I don't need an external control panel?

First check whether the client interface also uses the control API to get connection and policy status. If the local interface still needs access, restrict the external-controller listening address to the local loopback address and set an access key as required by the client. If you don't use the control API, disable it in the client or configuration. allow-lan controls whether LAN devices can use the proxy inbound; it does not restrict the control API's listening address. Check these settings separately.

Advanced Config: Policy Group Types and Examples →

Troubleshooting

First determine whether the issue affects one app, one node, or all connections, then follow the relevant checks.

All nodes are timing out. What should I check first?

Pause the proxy and confirm your device can reach sites that normally work without it. Complete any public Wi-Fi sign-in as well. Restart the client, check the system date and time, active configuration, and subscription status, then look at the first connection error. If the logs say a node domain couldn't be resolved, check DNS first. If only one probe URL fails, compare it with a real website request. When testing another network, keep the same node and configuration and change only the network to see whether the connection environment is the cause.

Why isn't my browser using the proxy when the system proxy is on?

Confirm the core is running in the client and note its current HTTP or mixed port. Then check the local address and port in your system proxy settings. Open a new browser connection and see whether it appears in the client. If it doesn't, check whether the browser has its own proxy settings, a proxy extension, or a system proxy exception for the target address. If it appears but the outbound is DIRECT, check the current mode and rules. In the first case, traffic never reached the core; in the second, the core chose a direct connection.

A browser works through the proxy on Windows, but UWP apps can't connect. What should I do?

First confirm that the browser works through the same system proxy, then check whether a connection appears in the client when the target app makes a request. Some apps running in an AppContainer are restricted from reaching local proxy ports due to loopback limitations. If the client offers a UWP loopback setting, and system policy allows it, add a loopback exemption only for apps that need the local proxy, then restart the app and test again. If no connection appears after adding the exemption, check whether the app reads system proxy settings.

How can I fix LAN devices or internal domains that stop working after enabling TUN?

Turn off TUN for comparison, then test the device's LAN IP and name separately. If only the name fails, check whether DNS interception by the client still forwards internal domains to the correct LAN resolver. Testing the address and name separately helps distinguish DNS issues from routing issues. If the IP also fails, check for overlap between TUN routes and other VPNs. Use settings supported by the current core to exclude only the LAN subnets that genuinely need a direct connection.

Advanced Config: TUN and Routing →