1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
mixed-port: 7890

allow-lan: false

# info / warning / error / debug / silent
log-level: warning

mode: rule

#自定义 geodata url
geox-url:
geoip: "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat"
geosite: "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat"
mmdb: "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.metadb"
geo-auto-update: true # 是否自动更新 geodata
geo-update-interval: 72 # 更新间隔,单位:小时

ipv6: false

profile:
store-selected: true
store-fake-ip: true

dns:
enable: true
listen: 127.0.0.1:1053
prefer-h3: false
ipv6: true # when the false, response to AAAA questions will be empty
enhanced-mode: fake-ip
fake-ip-range: 198.18.0.1/16
#fake-ip-filter:
# - '*.lan'
# - localhost.ptlogin2.qq.com
## 默认dns 用于解析DNS服务器的域名
default-nameserver:
- 223.5.5.5 # alibaba
#- 119.29.29.29 # tencent
- 114.114.114.114 # isp
## 只配置国外DNS 与nameserver-policy配合使用
nameserver:
- https://208.67.222.222/dns-query # opendns https://dns.opendns.com/dns-query
- https://101.101.101.101/dns-query # taiwan https://dns.twnic.tw/dns-query
- tls://8.8.8.8:853 # google dot
- tls://1.1.1.1:853 # cloudflare dot
## DNS解析策略 国内域名走国内DNS 其余走nameserver
nameserver-policy:
"geosite:cn,private":
- https://dns.alidns.com/dns-query # alibaba doh
- https://doh.pub/dns-query # tencent doh
"geosite:category-ads-all": rcode://success

proxies:
- foo1
- foo2

proxy-groups:
- name: PROXY
type: select
proxies:
- foo1
- foo2

# 规则. 常访问的国外服务靠前配置PROXY,GEOIP/GEOSITE为国内的DIRECT,其余默认PROXY
rules:
- GEOSITE,google,PROXY
- GEOSITE,microsoft,PROXY
- GEOIP,PRIVATE,DIRECT
- GEOIP,LAN,DIRECT
- GEOSITE,CN,DIRECT
- GEOIP,CN,DIRECT
- MATCH,PROXY