Skip to content

Instantly share code, notes, and snippets.

@harv
Last active May 29, 2026 08:19
Show Gist options
  • Select an option

  • Save harv/4db01a4c34fdd5be5b0b94e6be9cae08 to your computer and use it in GitHub Desktop.

Select an option

Save harv/4db01a4c34fdd5be5b0b94e6be9cae08 to your computer and use it in GitHub Desktop.
port: 7890
socks-port: 7891
allow-lan: true
mode: rule
log-level: info
external-controller: 127.0.0.1:9090
dns:
enable: true
nameserver:
- https://v.recipes/dns-cn
- https://v.recipes/dns-query
- https://dns.switch.ch/dns-query
- https://101.101.101.101/dns-query
- https://8.8.8.8/dns-query
- https://1.1.1.1/dns-query
nameserver-policy:
'geosite:private,cn,apple-cn,google-cn,microsoft@cn':
- '119.29.29.29'
- '223.5.5.5'
[custom]
enable_rule_generator=true
overwrite_original_rules=true
custom_proxy_group=PROXY`select`[]Fallback`[]AutoTest`[]HK`[]TW`[]SG`[]MY`[]JP`[]KR`[]US`[]UK`[]FR`[]DE`.*
custom_proxy_group=MATCH`select`[]DIRECT`[]PROXY
custom_proxy_group=Streaming`select`[]PROXY`[]DIRECT
custom_proxy_group=StreamingSE`select`[]DIRECT`[]PROXY
custom_proxy_group=Fallback`fallback`.*`https://www.gstatic.com/generate_204`300
custom_proxy_group=AutoTest`url-test`.*`https://www.gstatic.com/generate_204`300
custom_proxy_group=HK`url-test`(HK|HKG|香港)`https://www.gstatic.com/generate_204`300
custom_proxy_group=TW`url-test`(TW|台湾)`https://www.gstatic.com/generate_204`300
custom_proxy_group=SG`url-test`(SG|SIN|新加坡)`https://www.gstatic.com/generate_204`300
custom_proxy_group=MY`url-test`(MY|马来西亚)`https://www.gstatic.com/generate_204`300
custom_proxy_group=JP`url-test`(JP|NRT|日本)`https://www.gstatic.com/generate_204`300
custom_proxy_group=KR`url-test`(KR|韩国)`https://www.gstatic.com/generate_204`300
custom_proxy_group=US`url-test`(US|LAX|SJC|SEA|美国)`https://www.gstatic.com/generate_204`300
custom_proxy_group=UK`url-test`(UK|英国)`https://www.gstatic.com/generate_204`300
custom_proxy_group=FR`url-test`(FR|法国)`https://www.gstatic.com/generate_204`300
custom_proxy_group=DE`url-test`(DE|德国)`https://www.gstatic.com/generate_204`300
ruleset=DIRECT,clash-classic:https://ghfast.top/https://github.com/ACL4SSR/ACL4SSR/raw/master/Clash/Providers/UnBan.yaml,86400
ruleset=Streaming,clash-classic:https://ghfast.top/https://github.com/ACL4SSR/ACL4SSR/raw/master/Clash/Providers/ProxyMedia.yaml,86400
ruleset=StreamingSE,clash-classic:https://ghfast.top/https://github.com/ACL4SSR/ACL4SSR/raw/master/Clash/Providers/ChinaMedia.yaml,86400
ruleset=PROXY,clash-classic:https://ghfast.top/https://github.com/ACL4SSR/ACL4SSR/raw/master/Clash/Providers/ProxyGFWlist.yaml,86400
ruleset=DIRECT,clash-classic:https://ghfast.top/https://github.com/ACL4SSR/ACL4SSR/raw/master/Clash/Providers/ChinaDomain.yaml,86400
ruleset=DIRECT,clash-ipcidr:https://ghfast.top/ttps://github.com/ACL4SSR/ACL4SSR/raw/master/Clash/Providers/ChinaIp.yaml,86400
ruleset=DIRECT,clash-ipcidr:https://ghfast.top/https://github.com/ACL4SSR/ACL4SSR/raw/master/Clash/Providers/ChinaCompanyIp.yaml,86400
ruleset=DIRECT,clash-classic:https://ghfast.top/https://github.com/ACL4SSR/ACL4SSR/raw/master/Clash/Providers/Apple.yaml,86400
ruleset=DIRECT,[]IP-CIDR,0.0.0.0/8
ruleset=DIRECT,[]IP-CIDR,10.0.0.0/8
ruleset=DIRECT,[]IP-CIDR,100.64.0.0/10
ruleset=DIRECT,[]IP-CIDR,127.0.0.0/8
ruleset=DIRECT,[]IP-CIDR,172.16.0.0/12
ruleset=DIRECT,[]IP-CIDR,192.168.0.0/16
# ruleset=DIRECT,[]IP-CIDR,198.18.0.0/16
ruleset=DIRECT,[]IP-CIDR,224.0.0.0/4
# ruleset=DIRECT,[]GEOIP,CN
ruleset=MATCH,[]MATCH
clash_rule_base=https://ghfast.top/https://gist.githubusercontent.com/harv/4db01a4c34fdd5be5b0b94e6be9cae08/raw/clash_rule_base.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment