声明:

  1. 仅供研究和测试,请勿将其用于任何收费或违法活动,后果自负。
  2. 仅供自用,不一定适合其他人。

特点

  1. 适用于自建节点
  2. 多节点最低延迟/最稳定
  3. 白名单模式(绕过大陆)
  4. 非 tun 及 fakeip

配置

配置结构
1
2
3
4
5
6
7
8
9
10
11
{
"log": {},
"dns": {},
"inbounds": [],
"outbounds": [],
"routing": {},
"observatory": {},
"policy": {},
"metrics": {},
"stats": {}
}

log

log
1
2
3
{
"loglevel": "warning"
}

dns

dns结构
1
2
3
4
{
"hosts": {},
"servers": []
}

dns_host

dns_host
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
{
"geosite:category-ads-all": "127.0.0.1",
"domain:googleapis.cn": "googleapis.com",
"dns.alidns.com": [
"223.5.5.5",
"223.6.6.6",
"2400:3200::1",
"2400:3200:baba::1"
],
"one.one.one.one": [
"1.1.1.1",
"1.0.0.1",
"2606:4700:4700::1111",
"2606:4700:4700::1001"
],
"dot.pub": [
"1.12.12.12",
"120.53.53.53"
],
"dns.google": [
"8.8.8.8",
"8.8.4.4",
"2001:4860:4860::8888",
"2001:4860:4860::8844"
],
"dns.quad9.net": [
"9.9.9.9",
"149.112.112.112",
"2620:fe::fe",
"2620:fe::9"
],
"dns.yandex.net": [
"77.88.8.8",
"77.88.8.1",
"2a02:6b8::feed:0ff",
"2a02:6b8:0:1::feed:0ff"
],
"dns.sb": [
"185.222.222.222",
"2a09::"
],
"dns.umbrella.com": [
"208.67.220.220",
"208.67.222.222",
"2620:119:35::35",
"2620:119:53::53"
],
"dns.sse.cisco.com": [
"208.67.220.220",
"208.67.222.222",
"2620:119:35::35",
"2620:119:53::53"
]
}

dns_servers

dns_servers
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
[
{
"address": "https://1.1.1.1/dns-query",
"domains": [
"domain:bing.com",
"geosite:geolocation-!cn"
],
"expectIPs": [
"geoip:!cn"
]
},
{
"address": "quic+local://223.5.5.5",
"skipFallback": true,
"domains": [
"domain:online-fix.me",
"geosite:cn",
"geosite:category-games@cn"
],
"expectIPs": [
"geoip:cn"
]
},
"https://dns.google/dns-query",
"https://dns.sb/dns-query",
"https://dns.sse.cisco.com/dns-query"
]
dns_servers
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
[
{
"address": "https://1.1.1.1/dns-query",
"domains": [
"domain:bing.com",
"geosite:geolocation-!cn"
],
"expectIPs": [
"geoip:!cn"
]
},
{
"address": "localhost",
"skipFallback": true,
"domains": [
"domain:online-fix.me",
"geosite:cn",
"geosite:category-games@cn"
],
"expectIPs": [
"geoip:cn"
]
},
"https://dns.google/dns-query",
"https://dns.sb/dns-query",
"https://dns.sse.cisco.com/dns-query"
]

注:

  1. online-fix.me 为额外需要直连的域名,可删除或添加其他域名。
  2. 可添加对节点的域名 dns 直连解析的规则,如:
dns_servers_object
1
2
3
4
5
6
7
{
"address": "localhost",
"skipFallback": true,
"domains": [
"domain:example.com"
]
}

inbounds

inbounds
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
[
{
"tag": "socks",
"port": 10808,
"listen": "127.0.0.1",
"protocol": "socks",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
],
"routeOnly": false
},
"settings": {
"auth": "noauth",
"udp": true,
"allowTransparent": false
}
},
{
"tag": "socks3",
"port": 10810,
"listen": "0.0.0.0",
"protocol": "socks",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
],
"routeOnly": false
},
"settings": {
"auth": "noauth",
"udp": true,
"allowTransparent": false
}
},
{
"tag": "api",
"port": 10812,
"listen": "127.0.0.1",
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
}
}
]

不需要局域网开放和 api ,可以只保留第一项:

inbounds
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[
{
"tag": "socks",
"port": 10808,
"listen": "127.0.0.1",
"protocol": "socks",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
],
"routeOnly": false
},
"settings": {
"auth": "noauth",
"udp": true,
"allowTransparent": false
}
}
]

outbounds

outbounds
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[
{
"tag": "proxy-1",
"protocol": "vless"
// ...
},
{
"tag": "proxy-2",
"protocol": "vless"
// ...
},
{
"tag": "direct",
"protocol": "freedom"
},
{
"tag": "block",
"protocol": "blackhole"
}
]

可以根据需要添加更多的代理节点,只需确保 tag 开头为 proxy(或其他值)。

不需要多节点可以只添加一个代理出站,tagproxy

outbounds
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[
{
"tag": "proxy",
"protocol": "vless"
// ...
},
{
"tag": "direct",
"protocol": "freedom"
},
{
"tag": "block",
"protocol": "blackhole"
}
]

routing

routing结构
1
2
3
4
5
{
"domainStrategy": "IPIfNonMatch",
"rules": [],
"balancers": []
}

domainStrategy 可以选择 AsIs IPIfNonMatch IPOnDemand,具体差异可以查看文档:路由

不需要多节点将 balancers 项删除,rules 中的 "balancerTag": "proxy-round" 替换为 "outboundTag": "proxy"

routing_rules

routing_rules
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
[
{
"type": "field",
"inboundTag": [
"api"
],
"outboundTag": "api"
},
{
"type": "field",
"outboundTag": "direct",
"domain": [
"domain:online-fix.me",
"geosite:category-games@cn"
]
},
{
"type": "field",
"balancerTag": "proxy-round",
"domain": [
"domain:bing.com"
]
},
{
"type": "field",
"balancerTag": "proxy-round",
"domain": [
"domain:googleapis.cn",
"domain:gstatic.com"
]
},
{
"type": "field",
"port": "443",
"network": "udp",
"outboundTag": "block"
},
{
"type": "field",
"balancerTag": "proxy-round",
"domain": [
"domain:cloudflare-dns.com",
"domain:1dot1dot1dot1.cloudflare-dns.com",
"domain:dns.google",
"domain:dns.quad9.net",
"domain:dns.sb",
"domain:dns.umbrella.com",
"domain:dns.sse.cisco.com",
"domain:dns.yandex.net"
]
},
{
"type": "field",
"outboundTag": "block",
"domain": [
"geosite:category-ads-all"
]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"geoip:private"
]
},
{
"type": "field",
"outboundTag": "direct",
"domain": [
"geosite:private"
]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"223.5.5.5",
"223.6.6.6",
"2400:3200::1",
"2400:3200:baba::1",
"119.29.29.29",
"1.12.12.12",
"120.53.53.53",
"2402:4e00::",
"2402:4e00:1::",
"180.76.76.76",
"2400:da00::6666",
"114.114.114.114",
"114.114.115.115",
"114.114.114.119",
"114.114.115.119",
"114.114.114.110",
"114.114.115.110",
"180.184.1.1",
"180.184.2.2",
"101.226.4.6",
"218.30.118.6",
"123.125.81.6",
"140.207.198.6",
"1.2.4.8",
"210.2.4.8",
"52.80.66.66",
"117.50.22.22",
"2400:7fc0:849e:200::4",
"2404:c2c0:85d8:901::4",
"117.50.10.10",
"52.80.52.52",
"2400:7fc0:849e:200::8",
"2404:c2c0:85d8:901::8",
"117.50.60.30",
"52.80.60.30"
]
},
{
"type": "field",
"outboundTag": "direct",
"domain": [
"domain:alidns.com",
"domain:doh.pub",
"domain:dot.pub",
"domain:360.cn",
"domain:onedns.net"
]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"geoip:cn"
]
},
{
"type": "field",
"outboundTag": "direct",
"domain": [
"geosite:cn"
]
},
{
"type": "field",
"ip": [
"0.0.0.0/0",
"::/0"
],
"balancerTag": "proxy-round"
}
]

不需要 api 功能将第一项删除

domainStrategy 不使用 IPIfNonMatch ,需要将最后一项 ip 规则换为:

routing_rules_object
1
2
3
4
5
{
"type": "field",
"network": "tcp,udp",
"balancerTag": "proxy-round"
}

routing_balancers

routing_balancers
1
2
3
4
5
6
7
8
9
10
11
[
{
"selector": [
"proxy"
],
"strategy": {
"type": "leastLoad"
},
"tag": "proxy-round"
}
]

可根据具体需要更换 leastLoad其他值

observatory

连接观测,当 routing.balancers[].strategy.type 设置为 leastLoadleastPing ,需要配置。

observatory
1
2
3
4
5
6
7
8
{
"subjectSelector": [
"proxy"
],
"probeUrl": "https://www.google.com/generate_204",
"probeInterval": "1m",
"enableConcurrency": false
}

probeUrlprobeInterval 可根据需要更改。

api相关

不需要可以直接跳过

policy

policy
1
2
3
4
5
6
{
"system": {
"statsOutboundUplink": true,
"statsOutboundDownlink": true
}
}

metrics

policy
1
2
3
{
"tag": "api"
}

stats

不需要任何参数,只要 StatsObject 项存在,内部的统计即、就会开启。

policy
1
{}

完整配置

config.json
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
{
"log": {
"loglevel": "warning"
},
"dns": {
"hosts": {
"geosite:category-ads-all": "127.0.0.1",
"domain:googleapis.cn": "googleapis.com",
"dns.alidns.com": [
"223.5.5.5",
"223.6.6.6",
"2400:3200::1",
"2400:3200:baba::1"
],
"one.one.one.one": [
"1.1.1.1",
"1.0.0.1",
"2606:4700:4700::1111",
"2606:4700:4700::1001"
],
"dot.pub": [
"1.12.12.12",
"120.53.53.53"
],
"dns.google": [
"8.8.8.8",
"8.8.4.4",
"2001:4860:4860::8888",
"2001:4860:4860::8844"
],
"dns.quad9.net": [
"9.9.9.9",
"149.112.112.112",
"2620:fe::fe",
"2620:fe::9"
],
"dns.yandex.net": [
"77.88.8.8",
"77.88.8.1",
"2a02:6b8::feed:0ff",
"2a02:6b8:0:1::feed:0ff"
],
"dns.sb": [
"185.222.222.222",
"2a09::"
],
"dns.umbrella.com": [
"208.67.220.220",
"208.67.222.222",
"2620:119:35::35",
"2620:119:53::53"
],
"dns.sse.cisco.com": [
"208.67.220.220",
"208.67.222.222",
"2620:119:35::35",
"2620:119:53::53"
]
},
"servers": [
{
"address": "https://1.1.1.1/dns-query",
"domains": [
"domain:bing.com",
"geosite:geolocation-!cn"
],
"expectIPs": [
"geoip:!cn"
]
},
{
"address": "quic+local://223.5.5.5",
"skipFallback": true,
"domains": [
"domain:online-fix.me",
"geosite:cn",
"geosite:category-games@cn"
],
"expectIPs": [
"geoip:cn"
]
},
"https://dns.google/dns-query",
"https://dns.sb/dns-query",
"https://dns.sse.cisco.com/dns-query"
]
},
"inbounds": [
{
"tag": "socks",
"port": 10808,
"listen": "127.0.0.1",
"protocol": "socks",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
],
"routeOnly": false
},
"settings": {
"auth": "noauth",
"udp": true,
"allowTransparent": false
}
},
{
"tag": "socks3",
"port": 10810,
"listen": "0.0.0.0",
"protocol": "socks",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
],
"routeOnly": false
},
"settings": {
"auth": "noauth",
"udp": true,
"allowTransparent": false
}
},
{
"tag": "api",
"port": 10812,
"listen": "127.0.0.1",
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
}
}
],
"outbounds": [
{
"tag": "proxy-1",
"protocol": "vless"
// ...
},
{
"tag": "proxy-2",
"protocol": "vless"
// ...
},
{
"tag": "direct",
"protocol": "freedom"
},
{
"tag": "block",
"protocol": "blackhole"
}
],
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"inboundTag": [
"api"
],
"outboundTag": "api"
},
{
"type": "field",
"outboundTag": "direct",
"domain": [
"domain:online-fix.me",
"geosite:category-games@cn"
]
},
{
"type": "field",
"balancerTag": "proxy-round",
"domain": [
"domain:bing.com"
]
},
{
"type": "field",
"balancerTag": "proxy-round",
"domain": [
"domain:googleapis.cn",
"domain:gstatic.com"
]
},
{
"type": "field",
"balancerTag": "proxy-round",
"domain": [
"domain:cloudflare-dns.com",
"domain:1dot1dot1dot1.cloudflare-dns.com",
"domain:dns.google",
"domain:dns.quad9.net",
"domain:dns.sb",
"domain:dns.umbrella.com",
"domain:dns.sse.cisco.com",
"domain:dns.yandex.net"
]
},
{
"type": "field",
"port": "443",
"network": "udp",
"outboundTag": "block"
},
{
"type": "field",
"outboundTag": "block",
"domain": [
"geosite:category-ads-all"
]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"geoip:private"
]
},
{
"type": "field",
"outboundTag": "direct",
"domain": [
"geosite:private"
]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"223.5.5.5",
"223.6.6.6",
"2400:3200::1",
"2400:3200:baba::1",
"119.29.29.29",
"1.12.12.12",
"120.53.53.53",
"2402:4e00::",
"2402:4e00:1::",
"180.76.76.76",
"2400:da00::6666",
"114.114.114.114",
"114.114.115.115",
"114.114.114.119",
"114.114.115.119",
"114.114.114.110",
"114.114.115.110",
"180.184.1.1",
"180.184.2.2",
"101.226.4.6",
"218.30.118.6",
"123.125.81.6",
"140.207.198.6",
"1.2.4.8",
"210.2.4.8",
"52.80.66.66",
"117.50.22.22",
"2400:7fc0:849e:200::4",
"2404:c2c0:85d8:901::4",
"117.50.10.10",
"52.80.52.52",
"2400:7fc0:849e:200::8",
"2404:c2c0:85d8:901::8",
"117.50.60.30",
"52.80.60.30"
]
},
{
"type": "field",
"outboundTag": "direct",
"domain": [
"domain:alidns.com",
"domain:doh.pub",
"domain:dot.pub",
"domain:360.cn",
"domain:onedns.net"
]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"geoip:cn"
]
},
{
"type": "field",
"outboundTag": "direct",
"domain": [
"geosite:cn"
]
},
{
"type": "field",
"ip": [
"0.0.0.0/0",
"::/0"
],
"balancerTag": "proxy-round"
}
],
"balancers": [
{
"selector": [
"proxy"
],
"strategy": {
"type": "leastLoad"
},
"tag": "proxy-round"
}
]
},
"observatory": {
"subjectSelector": [
"proxy"
],
"probeUrl": "https://www.google.com/generate_204",
"probeInterval": "1m",
"enableConcurrency": false
},
"policy": {
"system": {
"statsOutboundUplink": true,
"statsOutboundDownlink": true
}
},
"metrics": {
"tag": "api"
},
"stats": {}
}