DOMAIN-SUFFIX,example.com,PROXY
GEOIP,CN,DIRECT
MATCH,PROXY
RULES
Rule-based routing: determine the connection path by match order
Rule mode checks requests from top to bottom, sending domains, IPs, or rule sets to the assigned proxy group. Common entries include DOMAIN-SUFFIX, GEOIP, RULE-SET, and the final MATCH. This is more than a simple on/off switch: it lets different destinations use different connection strategies. Before applying a config, confirm the proxy-group names and review rule order; more specific rules should come before broader ones. Unlike tools that provide only a global proxy, Clash emphasizes reusable, reviewable, and individually adjustable configuration for connection policies that need ongoing maintenance.
If a website does not follow the expected path, check the connection log first to see which rule matched, then return to the config file and adjust the target policy. Reload the config afterward so the old rules are not still in use.
Read the rule configuration guide →