Clash Proxy Modes Explained: Rule, Global, and Direct
See how Clash rule, global, and direct modes route traffic, and when to switch modes for everyday use, troubleshooting, or speed tests.
Modes change the outbound route, not which traffic is intercepted
Use rule mode for everyday browsing. If a site won’t load, switch to global mode and test it through the same node. To see whether the issue occurs only when using a proxy, try direct mode. These options correspond to mihomo’s mode: rule, mode: global, and mode: direct.
App → Clash inbound → outbound selected by the current mode
rule → rules checked top to bottom → outbound specified by the matching rule
global → GLOBAL proxy group → currently selected outbound
direct → DIRECT → core connects to the destination directly
The diagram starts with a connection that has already been handed to Clash. With the system proxy, whether traffic is covered depends on whether the app honors the proxy settings. TUN uses a virtual network interface and routing to capture traffic; its scope also depends on routes and exclusions. If an app hasn’t handed its traffic to the core, changing mode won’t change its route. Likewise, switching to direct mode doesn’t automatically disable the system proxy or TUN.
For example, a browser may reach a site through the local proxy inbound, while another app continues to use the system’s default route. To troubleshoot, open the client’s Connections page, initiate a new connection, and find its entry before checking which rule it matched. If there’s no entry, first check the app’s proxy settings, the active inbound port, and TUN’s capture scope.
Rule mode: match the destination, then check the proxy group
In rule mode, mihomo checks rules from top to bottom. For the domain rules below, a match on the first rule means the connection won’t reach the later suffix rule. The value on the right is the outbound name: it can be a built-in option like DIRECT or REJECT, or a proxy or group defined in the config. Groups have their own selection logic too: if a rule matches a manual selection group, check which outbound that group currently uses.
mode: rule
rules:
- DOMAIN,www.example.com,DIRECT
- DOMAIN-SUFFIX,example.com,Manual Select
- MATCH,DIRECT
This is a rule snippet, not a complete config. Manual Select must exactly match an outbound name in your config. If the core sees www.example.com as the destination domain, the first rule sends it direct. Under the same conditions, api.example.com matches the second rule, and the Manual Select group determines the outbound. Other destinations fall through to MATCH,DIRECT. Move MATCH to the top and none of the later rules will be reached.
After updating a subscription, check which config is actually active
A subscription is a source for configuration, not necessarily the configuration currently in use. A client may merge overrides when loading it, or the mode may be changed while it’s running. If the file says `rule` but the interface shows Global, first check which profile is selected and what mode the client currently reports. Then inspect a new connection to confirm which rule matched and which outbound was used. Edits to a cached subscription can be overwritten on the next update, so put rules you want to keep in a client-supported override or merged configuration.
Global mode: bypass rules temporarily to test a fixed outbound
In global mode, ordinary proxy connections that reach the core bypass rules and go to the GLOBAL proxy group. Global mode changes how the outbound is selected; it doesn’t guarantee that traffic uses a particular node. If GLOBAL is set to DIRECT, traffic still goes direct. If it’s set to another group, check which outbound that group ultimately selects.
- Reproduce the issue in rule mode. Note the destination domain, matched rule, final outbound, and what happened—did the connection time out, or did you receive an HTTP response?
- Switch to global mode and select the node you want to test in
GLOBAL. Stick to one node if possible; don’t let an automatic selection group switch outbounds mid-test. - Start a new connection and check its entry. Refreshing a browser page may reuse an existing connection, so close and reopen the test app. From the command line, run the request again.
- If global mode works but rule mode doesn’t, switch back to rule mode and compare the final outbound in both tests. A rule sending traffic direct, a rule matching a reject action, or a group selecting the wrong node is more specific than saying “rule mode is broken.”
Direct mode: keep the local inbound, bypass the remote proxy
In direct mode, intercepted ordinary proxy connections go to DIRECT. If your browser still points to 127.0.0.1:7890, requests still pass through local Clash; the core simply connects to the destination directly instead of using a remote proxy node. 7890 is an example and may not be the client’s current mixed-port value.
| Test setup | What it checks |
|---|---|
| Keep the inbound enabled and switch to direct mode | Whether the destination is reachable through the same local entry without using a remote node. |
| Disable traffic capture, clear the app’s explicit proxy, then connect again | Whether the app can reach the destination through the system’s normal network path. |
The results may differ. The first test may still use the core’s DNS or TUN path. For the second, make sure the system proxy, TUN, and any proxy set directly in the app no longer capture the request. If a direct connection through the core fails but the system’s normal route works, compare DNS results and routes before blaming the node. If both fail, check the destination service and your local network first.
Speed tests: keep the destination, inbound, and final outbound consistent
Latency tests in a client’s node list typically send a request to a URL specified in the config. They aren’t ICMP pings or download speed tests. A health check may test a node directly, which doesn’t mean rule-mode traffic will use that node. Latency can help you choose a node, but to verify actual routing, check the outbound used by a real request.
The example below uses local mixed port 7890 and explicitly sends a curl request to the same HTTPS URL through an HTTP proxy. Change the port to match your client. In Windows PowerShell, use curl.exe to avoid the command alias in older versions.
curl --proxy http://127.0.0.1:7890 --noproxy "" --max-time 15 -sS -o example-response.html -w "HTTP %{http_code} TTFB %{time_starttransfer}s TOTAL %{time_total}s\n" https://example.com/
--noproxy ""prevents an existingNO_PROXYsetting from bypassing the explicit proxy for this destination. The command writes the response to the current directory and doesn’t change your system proxy settings.TTFBis the time from sending the request to receiving the first byte, including connection setup and other overhead.TOTALis the total time for the operation. Check the HTTP status and error message first; a failed request that finishes quickly isn’t necessarily faster.- In global mode, select one node at a time and run the request three times for each, recording the median. Then switch back to rule mode and run the same command. Compare results only after checking the outbound on the Connections page. This simple check is useful for comparing connectivity, not estimating large-file download speeds.
Mode changes have no effect? Check the inbound, mode, and outbound
- No connection entry: Make sure the app is using the current listening address and port. Enabling the system proxy doesn’t mean a terminal will use it automatically; try the explicit proxy command above to verify the local inbound.
- Connection found, but the mode is wrong: Check the client’s current running mode and make sure you started a new connection after switching. Don’t use an existing download that’s still in progress to judge whether the change worked.
- Rule matched, but the wrong node was used: Check the group’s final outbound. Selecting a node in global mode changes
GLOBAL; in rule mode, the group referenced by the matched rule still determines the outbound. - Correct outbound, but the request still fails: Distinguish a connection failure from a server response. A
403means an HTTP response was received; check which end sent it. It doesn’t, by itself, prove that the domain failed to match a rule.
After comparing modes, restore rule mode for everyday use and test one destination expected to go direct and another expected to use a proxy. The routing test is only verified when the rule and final outbound in the connection entries match expectations—not just when a webpage loads.