Clash Proxy Modes: Rule vs. Global vs. Direct
Compare how Rule, Global, and Direct route traffic in Clash, when to use each mode, and how to switch modes for quick troubleshooting.
Proxy modes determine where traffic goes; system proxy and TUN determine how it gets there
Use Rule by default. Choose Global temporarily when you need to test with a specific outbound. Choose Direct when you want to keep Clash handling traffic but bypass proxy nodes. These modes correspond to mode: rule, mode: global, and mode: direct in the core configuration.
| Mode | Traffic flow after entering the core | Common use |
|---|---|---|
| Rule · Rule-based | Rules are evaluated from top to bottom, and the first match determines the policy: rules. | Send work-related sites direct while routing other specified domains through a proxy group. |
| Global · Global | Skip the usual routing rules and use the outbound currently selected in the GLOBAL group. | Pin a node to compare how a specific connection behaves in different modes. |
| Direct · Direct | Bypass rule-based outbound selection and connect directly to the destination without a proxy node. | Keep the traffic entry point in place and check whether the same destination is reachable directly. |
The system proxy usually applies only to apps that honor system proxy settings. TUN routes traffic through a virtual network interface and system routes; its coverage also depends on settings such as route exclusions. Apps can also connect explicitly to a local proxy port. Modes only affect connections that enter the core: if an app does not use that entry point, selecting Global will not route its traffic through a proxy. Conversely, selecting Direct does not automatically disable the system proxy, TUN, or the core DNS.
Rule mode: check the matching rule, then the policy group’s outbound
rules determine which policy handles a connection, while proxy-groups define each group’s members and selection behavior. A subscription is just one source of configuration; enabling one does not mean every connection will use its nodes. To determine how a destination is routed, first check which rule it matches, then see which outbound the corresponding group is actually using.
Rule order: specific matches first, fallback last
Here’s a configuration snippet that assumes a policy group named Proxy is already defined. DOMAIN matches an exact domain, so example.com goes direct. DOMAIN-SUFFIX matches the domain and its subdomains, so both example.org and www.example.org go through Proxy. Other destinations fall through to the final MATCH rule. This example uses direct as the fallback, but a subscription may instead route unmatched traffic through a proxy group.
mode: rule
rules:
- DOMAIN,example.com,DIRECT
- DOMAIN-SUFFIX,example.org,Proxy
- MATCH,DIRECT
If you move MATCH,DIRECT to the first line, none of the domain rules below it can match. A broad domain-suffix rule can also take precedence over a specific exception. For example, to send status.example.org direct, put its DOMAIN rule before DOMAIN-SUFFIX,example.org,Proxy. Clients may regenerate the active configuration when you switch configurations or update a subscription. After making changes, check the rule order in the configuration that is actually loaded—not just in the editor’s copy.
Global mode: compare briefly using the same node
If the same site times out in Rule mode, first check the domain and policy chain on the client's Connections page. Then switch to Global and select a specific node in the GLOBAL group. Menu names vary between clients, so verify the core mode and the current member of GLOBAL rather than relying on a UI label that says “Global.” If the group currently selects DIRECT, connections will still go direct in Global mode.
- In Rule mode, note the destination domain, matched rule, and final outbound. A web page may load API requests and static assets separately, so focus on the failed connection rather than just the URL in the address bar.
- Keep the system proxy and TUN settings unchanged, switch to Global, and retry the same request. Use a new connection if possible so the browser doesn’t reuse an existing one and make the mode shown in the UI differ from the actual traffic route.
- If Rule matches
DIRECTbut Global succeeds through a node, return to Rule and check the domain rule and fallback policy. If both Rule and Global fail through the same node, check the connection log for DNS, connection, or handshake errors before changing any rules.
Using Global long-term sends all intercepted connections through one outbound, bypassing the direct exceptions you may have configured for work services, local network addresses, or other destinations in rules. Whether local network connections are affected also depends on the entry point and whether the operating system routes them through the core. Once testing is done, switch back to Rule and add exceptions only for destinations that need them to limit the impact.
Direct mode: distinguish node issues from traffic interception issues
Direct answers the question: “Can this destination connect without using a proxy node?” If Rule fails through a node but Direct succeeds with the same entry point, the difference is in the outbound path. Next, check the policy group’s members and the node’s connection status. If both modes fail, check the destination address, DNS, and local routes; this result alone does not prove the server is unavailable.
Retest through the same local entry point
If your local configuration includes mixed-port: 7890, you can send an HTTP proxy request explicitly to that port. The command below makes an HTTPS request to the same example domain, with a connection timeout of 5 seconds and a total timeout of 15 seconds. These are test settings, not speed benchmarks. Replace 7890 if the active listener uses a different port. In Windows PowerShell, use curl.exe.
curl -v --proxy http://127.0.0.1:7890 --connect-timeout 5 --max-time 15 https://example.com/
Run the command again after each mode switch, then check whether the client logs a connection to example.com and shows its outbound. If the command is refused while connecting to 127.0.0.1:7890, first check that the core is running and the port is correct; the request has not reached the destination, so this says nothing about the node. If the command appears in the connection log but the browser request does not, retry in the browser and check whether the app uses the system proxy, matches a bypass list, or is routed through TUN.
To compare “direct through Clash” with “bypassing Clash entirely,” run a separate second test. On Windows 11, for example, check the manual proxy and automatic configuration script under Settings → Network & internet → Proxy. If the client’s TUN is enabled, turn it off separately and make sure the test app has no custom proxy configured. Only then can you compare the result with Direct mode. If Direct fails but bypassing the entry point succeeds, check Clash DNS settings, TUN routes, and the app’s traffic entry point first; these are not equivalent direct-connection tests.
Choosing a mode: use Rule for everyday routing, the other two to test assumptions
- Different destinations need different routes: Use Rule. After changing configurations, check exact-domain rules, the policy group’s current selection, and the final
MATCHrule. Then test one destination expected to go direct and one expected to use a proxy. - Only one site behaves unexpectedly in Rule: Use Global to test with a specific node. If the difference is due to a rule match, switch back to Rule and fix the relevant domain rule. Use connection logs to identify the login or API domains the page relies on.
- Just checking whether a node is needed: Keep the current entry point and switch to Direct to test the same connection. To find out whether traffic is handled by the system proxy, TUN, or the app’s own settings, change only one thing per test so the results are easier to interpret.
After switching back to Rule, start a new connection and confirm that both the rule and outbound are restored. If changing modes seems to have no effect, check the entry point, matched rule, and final outbound in that order—it’s more useful than repeatedly switching nodes.