"Domestic direct, international proxied" is the most common routing strategy for Chinese-network users: local sites keep full speed and cost no subscription traffic, while foreign sites go through nodes automatically. Most subscriptions ship exactly this scheme - here is its full structure so you can understand and modify it.
The four layers
- Private addresses direct: LAN and loopback must never enter the proxy.
- Explicit blocks/exceptions: ad blocking plus personal force-proxy/force-direct entries.
- Domestic traffic direct: a domestic domain set + GEOIP,CN.
- Everything else proxied: the MATCH fallback.
Complete example (provider-based)
rule-providers:
reject:
type: http
behavior: domain
url: "https://cdn.example.com/reject.txt"
path: ./ruleset/reject.yaml
interval: 86400
direct-cn:
type: http
behavior: domain
url: "https://cdn.example.com/direct.txt"
path: ./ruleset/direct.yaml
interval: 86400
cncidr:
type: http
behavior: ipcidr
url: "https://cdn.example.com/cncidr.txt"
path: ./ruleset/cncidr.yaml
interval: 86400
rules:
# 1. private ranges
- IP-CIDR,127.0.0.0/8,DIRECT,no-resolve
- IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
- IP-CIDR,10.0.0.0/8,DIRECT,no-resolve
- IP-CIDR,172.16.0.0/12,DIRECT,no-resolve
# 2. blocking and personal exceptions
- RULE-SET,reject,REJECT
- DOMAIN-SUFFIX,my-bank.com,DIRECT
# 3. domestic direct
- RULE-SET,direct-cn,DIRECT
- RULE-SET,cncidr,DIRECT,no-resolve
- GEOIP,CN,DIRECT
# 4. fallback
- MATCH,Select
Substitute the provider URLs with your chosen community source (e.g. the matching files from Loyalsoldier/clash-rules).
Whitelist vs blacklist thinking
- The layout above is whitelist thinking: known-domestic traffic goes direct, everything unknown defaults to the proxy. Obscure foreign sites never slip through.
- The inverse (default direct, maintain a "needs proxy" list) saves traffic but the list forever lags behind new sites. Whitelist thinking is the everyday recommendation.