Rule Mode
Uses rules such as DOMAIN, IP-CIDR, GEOSITE, GEOIP, and MATCH to determine where each connection goes. Rules are matched from top to bottom, and matching stops at the first hit.
This workflow applies to common clients based on the Clash or mihomo core. Import the subscription, choose a proxy mode, enable the connection, and verify routing in order—no complex configuration edits are required first.
Confirm that the client is installed and opens to its main interface normally. On first launch, desktop systems may ask whether to allow network access; mobile clients usually request permission to create a VPN profile when you actually start the connection. Grant the routine permissions requested by the system, but do not enable every advanced permission in advance. Once the client shows basic pages such as Config, Proxy, Logs, and Settings, continue.
Next, prepare a working subscription URL. A network service provider usually supplies this URL so the client can retrieve proxy settings, policy groups, and rules. When copying it, select everything from the beginning to the end, without dropping parameters or leaving spaces or line breaks before or after the link. Treat the subscription URL as a personal configuration credential; do not paste it into public forums, screenshots, or public logs.
If you received a local YAML file, use “Import from File” or “Open Configuration File” instead. The remaining steps are much the same as for a subscription. The main difference is that subscriptions can be updated remotely, while local files must be replaced manually. For first-time setup, use the method recommended by the provider and avoid importing several similar configurations at once, or it may become unclear which one is active.
If the client is not installed yet, visit the Download Center and choose your platform. The user documentation provides fuller details on package selection, system architecture, and platform-specific permissions; this page starts after the client has been installed.
After opening the client, go to the “Subscription,” “Config,” or “Profiles” page. Desktop clients usually place this entry in the left navigation, while mobile clients may put it at the top of the home screen or inside Settings. Find the URL field, paste the complete subscription URL you prepared, and click “Import,” “Download,” or the confirmation button on the right. Some clients ask for a configuration name first. This name is only for local identification—you can use the service or purpose, and it does not change the subscription content.
After clicking Import, wait for the request to finish instead of clicking repeatedly. Normally, a new item appears in the configuration list with its name, update time, or an update button. You must then click the item to make it active; appearing in the list alone does not mean the client is using it. Common indicators include a brand-colored marker, a changed background, a selected radio button, or the current configuration name shown at the top of the page.
After selecting the configuration, switch to the “Proxy” or “Policy Groups” page. You should see the policy groups defined in the configuration, such as “Auto Select,” “Node Selection,” “Failover,” or “DIRECT.” Names vary by subscription, so they do not need to match these examples exactly. The key check is that the policy group page contains content rather than remaining blank, loading indefinitely, or showing only an error. If it is still empty, return to the configuration page and verify that the imported item is enabled.
After the subscription imports successfully, check the update interval in its configuration details. Common options include hourly updates or manual refreshes. During basic setup, frequent refreshing is unnecessary; unless the provider announces a change, keep the client's default interval. Updating fetches the configuration again but usually does not change the system proxy switch. If the policy groups change after an update, simply confirm the current selection again.
If the subscription import fails, first check that the URL is complete, then try fetching it again on the current network. A timeout usually means the client did not retrieve the configuration within the allowed time; a format error means the response is not YAML the client can recognize. Do not fix format issues by changing file extensions, and do not save a web error page as a configuration file. Find related errors under “Installation and Configuration” in Troubleshooting.
Once the configuration is selected and the policy groups open normally, subscription import is complete. The next step only determines how the client handles connections; you do not need to import the configuration again.
Open “Mode,” “Proxy Mode,” or the mode selector on the home page. Most Clash clients offer three basic modes: Rule, Global, and Direct. For initial setup, choose “Rule” mode, commonly called Rule mode. It reads the rules in the current configuration and checks the destination domain, IP address, or rule set from top to bottom. After the first match, it hands the connection to the corresponding policy. This sends connections that need a proxy through the proxy policy while keeping LAN traffic and configured services direct.
Global mode sends most connections through one proxy policy. It is useful for briefly checking whether the proxy itself works, but not for determining whether the rules are correct. Direct mode bypasses the proxy and is commonly used to pause proxying or run comparison tests. For everyday setup, keep Rule mode selected and switch to Global or Direct only temporarily while troubleshooting.
Uses rules such as DOMAIN, IP-CIDR, GEOSITE, GEOIP, and MATCH to determine where each connection goes. Rules are matched from top to bottom, and matching stops at the first hit.
Sends connections through the selected policy. If Rule mode fails but Global mode works, the issue is more likely related to rule order or policy assignment.
Connects directly to the destination. Use it to determine whether the problem comes from the local network, the proxy path, or the client's traffic interception method.
With Rule mode selected, open the “Proxy” page and find the policy group handling the main proxy traffic. It may be called “Node Selection,” “Proxy,” “Manual,” or another name defined by the provider. Expand the group and choose the provider-recommended automatic policy or another currently available option. A policy group sits between the rules and the actual connection method: rules usually hand traffic to a policy group, which then selects the specific option to use.
If the configuration contains multiple policy groups, do not change them one by one. Start with the top-level main selection group and leave the other groups at their defaults. For example, when rules send streaming, downloads, and common websites to separate groups, those child groups usually already have default options. Changing too much at once makes troubleshooting harder. Adjust individual groups only after connection verification succeeds.
Labels such as “Auto Select,” “Load Balance,” and “Failover” describe how a policy group works; they are not proxy modes. Proxy mode determines whether the client reads rules, while the policy group chooses the path after a rule matches. These concepts are easy to confuse—see Clash Concepts at a Glance for detailed definitions.
Return to the client's home or “Settings” page and check the core status first. Some clients start the core automatically after installation and show “Running” immediately; others require you to click a start button. The configuration and rules only handle connections once the core is running. If enabling the system proxy has no effect, first check whether the core is still stopped.
Once the core is running, enable “System Proxy” on desktop first. Windows and macOS write the client's local proxy address to the system network settings, allowing browsers and other apps that follow system proxy settings to send connections through Clash. When enabled successfully, the switch stays on and the corresponding proxy entry appears in the system network settings. For the first test, do not enable TUN mode at the same time; fewer variables make verification easier.
Android and iOS clients usually intercept traffic through the system VPN interface. After tapping “Connect,” “Start,” or the home-page switch, the system displays a VPN permission prompt. Confirm that the app name matches the current client and allow the connection; a system VPN indicator should then appear in the status bar. This mobile VPN interface passes traffic to the local proxy core and does not necessarily mean a traditional enterprise VPN is being used. Actual routing is still determined by the current Clash configuration.
TUN mode creates a virtual network interface that can intercept more apps that ignore system proxy settings. It is also useful for UDP traffic and command-line programs. If a browser works normally through the system proxy but a particular app consistently bypasses it, consider enabling TUN. The first desktop activation may request administrator access or installation of a network component; complete the authorization in the client and then check the core status again.
System Proxy and TUN cover different types of traffic. Some clients allow both to be enabled, but basic setup is easier when you verify one primary interception method at a time: use System Proxy for browser testing first, then disable it and test TUN when broader coverage is needed, or follow the combination recommended by the client. If the network goes offline, this makes it easier to tell whether the cause is the configuration, virtual interface, DNS, or permissions.
Before connecting, check whether other proxies, VPNs, network filters, or packet-capture tools are still running. When several programs modify the system proxy, routing table, or DNS at once, every interface may show “connected” while traffic actually follows a different path. During basic verification, keep only the current Clash client active; temporarily disable standalone proxy extensions in the browser as well. Restore only the tools you genuinely need, one at a time, after verification.
If the system proxy switch turns off immediately, check whether the core is running, whether system permissions allow proxy changes, and whether another program is using the client's port. If TUN fails to start, return to System Proxy and complete the browser test first, then review TUN permissions, virtual adapters, and DNS under Troubleshooting. Do not change the port, DNS, and rules simultaneously before a connection is established.
Once the client shows the core as running and System Proxy or the mobile VPN is enabled, proceed to verification. An enabled switch is only a prerequisite; use real connections and logs to confirm that traffic is actually following the expected rules.
Close any test pages you opened earlier, then open a new browser tab and visit a commonly used website. A new connection avoids interference from cached pages, existing long-lived connections, and browser preloading. After the page loads, do not rely on the page alone. Switch back to the Clash client's “Connections” page and check for a new record corresponding to the destination you just visited.
A connection record usually shows the destination domain, connection type, matched rule, or policy used. Fields vary by client, but new connections should keep appearing. Open a record and confirm that it went through a policy group in the current configuration rather than showing DIRECT for everything. DIRECT is normal when visiting a LAN address that should bypass the proxy; judge the result by the destination type instead of treating every direct connection as a failure.
Next, run a routing comparison: visit a service that the configuration should access directly, then one that should use a proxy policy. Return to the connection records or logs and compare the matched rules. In Rule mode, logs commonly include information such as DOMAIN-SUFFIX, GEOIP, GEOSITE, or MATCH. If the two destinations follow their expected paths, the subscription, Rule mode, policy group, and system interception are working together.
After reopening the page, it loads normally without relying on a connection already established in an old tab.
The Connections page shows the relevant domain or destination address, confirming that system traffic has entered the client.
Direct and proxied destinations follow different paths, and Rule mode routes them as designed by the configuration.
If the page will not open but a connection record already appears, System Proxy or VPN interception is probably working. The issue is more likely the policy choice, remote connection, DNS, or rule result. Open “Logs” and review entries from the time you visited the site. If a connection timed out after being sent to a policy, switch back to the provider's automatic policy and test again. If DNS resolution failed, check the DNS configuration and local network first.
If no new record appears at all when you visit a page, the problem usually occurs before traffic reaches the core. On desktop, check that System Proxy is still enabled and that the browser is not using separate proxy settings. On mobile, check for the system VPN indicator and whether power-saving settings stopped the client. In TUN mode, also confirm that the virtual interface actually started rather than merely displaying an enabled switch.
After verification, keep Rule mode and the current main policy group. Future subscription updates usually do not require repeating the entire process; update the configuration and confirm that it remains selected. If access suddenly fails after an update, note the configuration name and time before and after the update, then check the mode, policy group, and system switch in order. Do not start by deleting every configuration.
Check one layer at a time. The Clash connection path can be simplified as “Subscription configuration → Proxy mode and policy group → Core running → System interception → DNS and remote connection.” Working from left to right is easier than changing several switches at once.
Return to the configuration page and confirm that the subscription item is still selected and its latest update completed without errors. If several configurations are listed, temporarily keep only one as the current item. If the policy page is empty after an update, the configuration likely failed to load; this is not usually a system proxy issue.
Set the proxy mode back to Rule mode and restore the main policy group to the provider-recommended automatic or default option. If you manually changed several child groups, restore the key groups first so that none remains on an unavailable option.
Confirm that the core shows as running. On desktop, turn System Proxy off and on again; on mobile, establish the VPN connection again. If TUN reports a startup error, switch to System Proxy and test in a browser first to distinguish a configuration issue from a virtual-interface issue.
Visit a new webpage and see whether a record appears. No record means you should check system interception; a record with a failed connection means you should inspect the matched policy and logs. Timeouts, connection refusals, DNS failures, and rule misses point to different causes and should not be handled the same way.
Save the current error details, exit the client, and confirm that its related processes have ended before launching it again. If the system proxy remains configured or the virtual interface is in an abnormal state, disable the proxy and restart the network connection. When reopening the client, restore it using the four steps on this page instead of immediately importing several new configurations.
Find specific error meanings, DNS resolution failures, TUN permissions, and subscription update issues by category in Troubleshooting. For concepts such as Fake-IP, rule priority, policy groups, GEOSITE, and the mihomo core, use Concepts at a Glance. If you are ready to configure startup behavior, LAN access, and platform-specific permissions, continue to the all-platform user documentation; there is no need to complete every advanced setting during basic connection setup.
Keep Rule mode enabled and record the current configuration name and interception method. When adjusting rules, DNS, or TUN later, change one item at a time and verify the connection records again.