These modes only determine how connections that reach the core are routed
Use rule mode for everyday browsing. Switch to global mode for a quick test if you suspect a site is matched by the wrong rule. Use direct mode to compare your local connection while keeping the current traffic entry point in place. In Clash and Mihomo configs, rule, global, and direct are mode values—not settings for system proxy or TUN.
| Mode | How the core selects an outbound route | What to check after switching |
|---|---|---|
Rule (rule) | Checks rules from top to bottom and uses the target of the first match. | Whether a specific rule matched or the final fallback did, and which option the policy group selected. |
Global (global) | Skips normal rule-based routing and uses the outbound currently selected in GLOBAL. | Whether the intended option is selected in Global; it may also be set to DIRECT. |
Direct (direct) | Sends connections received by the core straight to their destinations, without a proxy node. | Whether the traffic entry point is still active and DNS is still handled by the core. |
System proxy settings usually affect only apps that honor them. TUN routes traffic to the core based on the virtual adapter's routing and capture scope. If an app doesn't use the system proxy and isn't captured by TUN, switching to global won't change its route. Likewise, switching to direct won't turn off the system proxy, remove the virtual adapter, or automatically restore the system's default DNS settings.
Rule Mode: Check the Match, Then the Policy Group
Rule mode is useful for routing different destinations separately in everyday use. Here's a sample config: the exact domain www.example.com goes through the policy group named “Everyday Proxy,” while all other traffic connects directly. Before adding this to an existing config, make sure proxy-groups contains a group with that exact name. This snippet doesn't define any nodes or groups.
mode: rule
rules:
- DOMAIN,www.example.com,Everyday Proxy
- MATCH,DIRECT
DOMAINmatches the exact domain. In this example,example.comitself won't match the first rule. To route the root domain and all its subdomains the same way, replace that rule withDOMAIN-SUFFIX,example.com,Everyday Proxy.MATCHis the catch-all rule and usually belongs last. If an earlier rule already matches, adding a new rule after it won't change the route for that connection.- “Everyday Proxy” is a group name, not a node name. Even if the right rule matches, check which node is currently selected in the group—or whether
DIRECTis selected.
After importing a subscription, open the client's Connections view and check the destination domain, matched rule, and outbound route. Menu names vary slightly between clients. A single page may connect to separate domains for login, images, and API requests. If the home page loads but login fails, find the hostname used by the failed request instead of checking only the domain in the address bar. Before editing rules, distinguish the original subscription from local overrides: edits to a managed copy may be overwritten when you refresh the subscription.
Global Mode: Pin a Node to Isolate Rule Routing
Global mode is useful for a controlled comparison. In rule mode, note the problem connection's destination, matched rule, and actual outbound route. Then leave system proxy, TUN, and DNS settings unchanged, switch to global, and explicitly select a known-good node in GLOBAL. Reconnect using the same app and compare. Switching modes won't reroute existing long-lived connections, so close and reopen the app before testing.
- Global works, but rule mode doesn't: Compare the actual outbound routes first. If rule mode uses the catch-all direct route, check whether there's a rule for the destination domain. If the two tests use different nodes, select the same node in the rule group and global mode, then test again.
- Both modes fail, but connections are logged: Check whether the logs show a DNS resolution failure, connection timeout, or handshake error. Rules aren't the only variable; investigate the failing stage before rewriting the routing rules.
- The app's test connection doesn't appear after switching: Check whether the app uses the system proxy, has a proxy configured explicitly, and is covered by TUN routing. Also make sure the client's Connections view isn't filtering out the destination.
Direct Mode: Separate Node Issues from Traffic Capture
Direct mode removes the remote proxy node from the route, not Clash itself. For example, the browser may still send requests to the local 127.0.0.1:7890 port. The core receives the connection and accesses the destination over your local network. If core DNS or TUN DNS hijacking is enabled, don't assume switching to direct also changes the DNS resolution path.
On Windows 11, go to Settings → Network & internet → Proxy to check whether a manual proxy is enabled. The PowerShell example below assumes mixed-port is set to 7890 and listening on localhost. The first command explicitly sends the request to the core; the second tells curl not to use an application-level proxy for that request. If TUN is still capturing traffic, the second request may still pass through the core.
curl.exe --noproxy "" --proxy http://127.0.0.1:7890 -I https://example.com/
curl.exe --noproxy "*" -I https://example.com/
If the first command fails to connect to the local port, check the listening port and make sure the core is running; changing modes won't fix an entry-point failure. These commands compare HTTPS requests only and can't tell you whether UDP works for games. To test an app with Clash fully bypassed, run a separate test: turn off Clash's system proxy and TUN, remove any proxy configured in the app, then reopen it. Note your original settings and restore them afterward. Don't disconnect a VPN required by your organization.
Choosing a Mode for Browsing, Gaming, and Work
Everyday Browsing: Use Rule Mode
For local banking sites, router admin pages, or home devices that need a local connection, route those destinations to DIRECT with a rule. There's no need to switch the entire client just to access one device. When reviewing connection logs, check the domain rule, policy group selection, and final outbound route separately. If a page works only after switching to global, test it again with the same node before deciding whether to change a rule for that page.
Gaming: Check Login, Matchmaking, and Gameplay Separately
A launcher login may use HTTPS, while gameplay may use UDP, so they may not follow the same route into the core. Start with a direct connection as a baseline and compare latency and packet loss on the same game server. If gameplay needs a proxy, confirm that its traffic reaches the core and that the selected outbound supports UDP. A successful web login doesn't prove the game route works, and an HTTP response time from a node speed test isn't the same as in-game latency.
Work: Preserve Intranet DNS and Routing First
Corporate intranet domains often depend on company DNS. Even if a rule routes traffic to DIRECT, the site may still fail if the wrong DNS server is used. For an intranet outage, first confirm the corporate VPN is connected and can resolve the domain, then check for overlapping routes between TUN and the VPN. In most workplaces, follow your organization's requirements for rule mode or bypassing Clash rather than routing work traffic through a global outbound long-term.