某2ray白名单路由正确写法

之前一直用的Loyalsoldier的路由规则文件,路由是这么写的:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"routing": {
"rules": [
{
"type": "field",
"outboundTag": "direct",
"domain": [
"geosite:private",
"geosite:apple-cn",
"geosite:cn"
]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"geoip:private",
"geoip:cn"
]
}
]
}

最近发现gstatic.com域名无法访问了,研究发现gstatic.com域名是包含在getsite:cn里面的,正确写法如下:

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
"routing": {
"rules": [
{
"type": "field",
"outboundTag": "Direct",
"domain": [
"geosite:private",
"geosite:tld-cn"
]
},
{
"type": "field",
"outboundTag": "Proxy",
"domain": [
"geosite:geolocation-!cn"
]
},
{
"type": "field",
"outboundTag": "Direct",
"domain": [
"geosite:cn"
]
}
]
}