前言

  • 保存一下个人 singbox 使用的配置hison
  • sing-box 启动模块以神秘模块为基础
  • 也许根据核心更新实时更新配置

介绍

singbox 是一个新的通用跨平台代理软件客户端,它支持多种代理协议,如 Shadowsocks、Vmess、Trojan、Hysteria 2 等¹。它可以帮助您访问被屏蔽或限制的网站和服务,如 Google、YouTube、Facebook 等。它还具有许多新的特性,如 Reality 和 hysteria2 协议,以及自动选择最佳节点等。

singbox 目前支持 Windows、Mac、Android、iOS 和 Apple TV 等平台上使用¹。您可以从官网或应用商店下载安装 singbox,然后导入订阅链接或自建配置文件,即可开始使用。

singbox 是一个强大的代理工具,堪称代理工具中的瑞士军刀,是少有的同时支持 iOS 和 Apple TV 并且免费的代理应用。

配置

完整配置

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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
{
log:
{
disabled: true
level: error
output: ./src/log/box.log
timestamp: true
}
dns:
{
fakeip:
{
enabled: false
inet4_range: 198.18.0.0/15
inet6_range: fc00::/18
}
servers:
[
{
tag: proxyServerNameServer
address: https://223.5.5.5/dns-query
detour: direct
strategy: prefer_ipv4
notice: 传送阵域名解析专用 DNS 服务器
}
{
tag: directDns
address: https://223.5.5.5/dns-query
detour: direct
notice: 大白嗓唱法使用的 DNS 服务器
}
{
tag: proxyDns
address: tcp://1.1.1.1
detour: proxy
notice: 国外 DNS 服务器
}
{
tag: GLOBALDns
address: tcp://1.1.1.1
detour: direct
notice: 学院派唱法使用的 DNS 服务器
}
{
enabled: false
tag: dhcp
address: dhcp://auto
notice: 向上游 dhcp 服务器发起 DNS 请求,因为有人过敏,默认关闭,有需要自行打开
}
{
enabled: false
tag: local
address: local
notice: 通过系统 DNS 发起 DNS 请求,因为有人过敏,默认关闭,有需要自行打开
}
{
enabled: false
tag: fakedns
address: fakeip
notice: fakeip 专用 DNS 服务器
}
{
tag: nxdomain
address: RCode://success
notice: 对域名解析返回空解析
}
{
tag: dnspod-udp
address: 119.29.29.29
detour: domestic
}
{
tag: dnspod-doh
address: https://120.53.53.53/dns-query
detour: domestic
}
{
tag: fiftythree
address: https://1.15.50.48/verse
detour: domestic
}
]
rules:
[
{
outbound:
[
direct
OUTBOUNDLESS
]
server: dnspod-udp
notice: 直连域名解析规则
}
{
outbound: any
server: proxyServerNameServer
disable_cache: true
notice: 传送阵域名解析规则
}
{
enabled: false
rule_set: category-ads-all-domain
server: nxdomain
notice: 通过 geosite 内建广告规则进行 DNS 层面的广告拦截,默认关闭,有需要自行打开
}
{
clash_mode: Direct
server: directDns
}
{
domain_suffix:
[
.msftncsi.com
.msftconnecttest.com
]
server: dnspod-doh
}
{
query_type:
[
A
AAAA
]
server: directDns
rewrite_ttl: 0
notice: 对 A 和 AAAA 类型的 DNS 请求返回 fake-ip 以尽量减少本地 dns 解析并尽可能的将域名送向远端。
}
{
clash_mode: Global
server: GLOBALDns
}
{
rule_set:
[
proxy-domain
tiktok-domain
]
server: proxyDns
}
{
domain: www.gstatic.com
server: dnspod-doh
}
{
rule_set:
[
push-domain
direct-domain
bytedance-domain
microsoft@cn-domain
apple@cn-domain
category-games@cn-domain
cn-domain
]
server: dnspod-doh
}
{
rule_set: geolocation-!cn-domain
server: proxyDns
}
{
enabled: true
domain_regex: .
fallback_rule:
{
rule_set: cn-ip
invert: true
}
server: fiftythree
}
]
final: proxyDns
strategy: ipv4_only
reverse_mapping: true
independent_cache: true
notice: 由于部分机器对 ipv6 解析过敏,默认设置为 ipv4_only,有需要可以自行修改
}
inbounds:
[
{
enabled: false
tag: tproxy
type: tproxy
listen: "::"
listen_port: 10086
sniff: true
always_resolve_udp: true
sniff_override_destination: false
sniff_override_rules:
[
{
rule_set:
[
push-domain
push-ip
skip-override
]
invert: true
}
]
}
{
enabled: true
tag: tun
type: tun
interface_name: ccmni88
inet4_address: 172.19.0.0/16
inet6_address: 2001:10::/28
strict_route: true
auto_route: true
stack: system
sniff: true
always_resolve_udp: true
sniff_override_destination: false
sniff_override_rules:
[
{
rule_set:
[
push-domain
push-ip
skip-override
]
invert: true
}
]
}
]
outbounds:
[
{
tag: direct
type: direct
}
{
tag: block
type: block
}
{
tag: dns
type: dns
}
{
tag: proxy
type: selector
outbounds:
[
国际国外-手动
新加坡
台湾
香港
]
}
{
tag: domestic
type: selector
outbounds:
[
direct
国际国内-手动
]
}
{
tag: UDP代理
type: selector
outbounds:
[
direct
domestic
国际udp
]
}
{
tag: 广告拦截
type: selector
outbounds:
[
domestic
proxy
block
]
}
{
tag: 国际国内-手动
type: selector
providers: 国际
includes: 移动|联通|电信|BGP
}
{
tag: 国际国外-手动
type: selector
providers: 国际
excludes: CN|校园网|电信|移动|联通|BGP
}
{
tag: GLOBAL
type: selector
enabled: false
providers: all
}
{
tag: 新加坡
type: urltest
interval: 6m
tolerance: 60
providers: 国际
includes: 新加坡|SG
}
{
tag: 台湾
type: urltest
interval: 6m
tolerance: 60
providers: 国际
includes: 台湾|TW
}
{
tag: 香港
type: urltest
interval: 6m
tolerance: 60
providers: 国际
includes: 香港|HK
}
{
tag: 国际udp
type: selector
providers: 国际
includes: 移动|联通|电信|BGP
}
]
route:
{
rule_set:
[
{
tag: category-ads-all-domain
path: ./RuleProviders/category-ads-all-domain.srs
url: https://raw.githubusercontent.com/CHIZI-0618/v2ray-rules-dat/release/singbox_rule_set/geosite-category-ads-all.srs
type: remote
format: binary
download_detour: proxy
update_interval: 24h
}
{
tag: geolocation-!cn-domain
path: ./RuleProviders/geolocation-!cn-domain.srs
url: https://raw.githubusercontent.com/CHIZI-0618/v2ray-rules-dat/release/singbox_rule_set/geosite-geolocation-!cn.srs
type: remote
format: binary
download_detour: proxy
update_interval: 24h
}
{
tag: tiktok-domain
path: ./RuleProviders/tiktok-domain.srs
url: https://raw.githubusercontent.com/CHIZI-0618/v2ray-rules-dat/release/singbox_rule_set/geosite-tiktok@!cn.srs
type: remote
format: binary
download_detour: proxy
update_interval: 24h
}
{
tag: google-domain
path: ./RuleProviders/google-domain.srs
url: https://raw.githubusercontent.com/0730aa/v2ray-rules-dat/release/singbox_rule_set/geosite-google.srs
type: remote
format: binary
download_detour: proxy
update_interval: 24h
}
{
tag: bytedance-domain
path: ./RuleProviders/bytedance-domain.srs
url: https://raw.githubusercontent.com/CHIZI-0618/v2ray-rules-dat/release/singbox_rule_set/geosite-bytedance.srs
type: remote
format: binary
download_detour: proxy
update_interval: 24h
}
{
tag: apple@cn-domain
path: ./RuleProviders/apple@cn-domain.srs
url: https://raw.githubusercontent.com/CHIZI-0618/v2ray-rules-dat/release/singbox_rule_set/geosite-apple@cn.srs
type: remote
format: binary
download_detour: proxy
update_interval: 24h
}
{
tag: microsoft@cn-domain
path: ./RuleProviders/microsoft@cn-domain.srs
url: https://raw.githubusercontent.com/CHIZI-0618/v2ray-rules-dat/release/singbox_rule_set/geosite-microsoft@cn.srs
type: remote
format: binary
download_detour: proxy
update_interval: 24h
}
{
tag: category-games@cn-domain
path: ./RuleProviders/category-games@cn-domain.srs
url: https://raw.githubusercontent.com/CHIZI-0618/v2ray-rules-dat/release/singbox_rule_set/geosite-category-games@cn.srs
type: remote
format: binary
download_detour: proxy
update_interval: 24h
}
{
tag: cn-domain
path: ./RuleProviders/cn-domain.srs
url: https://raw.githubusercontent.com/CHIZI-0618/v2ray-rules-dat/release/singbox_rule_set/geosite-cn.srs
type: remote
format: binary
download_detour: proxy
update_interval: 24h
}
{
tag: cn-ip
path: ./RuleProviders/cn-ip.srs
url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geoip/cn.srs
type: remote
format: binary
download_detour: proxy
update_interval: 24h
}
{
tag: proxy-domain
path: ./RuleProviders/proxy-domain.json
type: local
format: source
}
{
tag: direct-domain
path: ./RuleProviders/direct-domain.json
type: local
format: source
}
{
tag: push-domain
path: ./RuleProviders/push-domain.json
type: local
format: source
}
{
tag: push-ip
path: ./RuleProviders/push-ip.json
type: local
format: source
}
{
tag: skip-override
path: ./RuleProviders/skip-override.json
type: local
format: source
}
]
rules:
[
{
enabled: true
rule_set: category-ads-all-domain
outbound: 广告拦截
notice: 广告拦截
}
{
protocol: dns
outbound: dns
notice: dns 解析劫持
}
{
clash_mode: Direct
outbound: direct
}
{
clash_mode: Global
outbound: direct
}
{
network: udp
rule_set:
[
cn-domain
cn-ip
]
outbound: UDP代理
}
{
enabled: false
ip_version: 6
outbound: block
notice: 拦截 ipv6 流量
}
{
enabled: false
protocol: quic
outbound: block
notice: 拦截 quic 流量
}
{
rule_set:
[
proxy-domain
google-domain
tiktok-domain
]
outbound: proxy
}
{
rule_set:
[
push-domain
direct-domain
bytedance-domain
microsoft@cn-domain
apple@cn-domain
category-games@cn-domain
cn-domain
]
outbound: domestic
}
{
rule_set: geolocation-!cn-domain
outbound: proxy
notice: 国外地址代理(减少域名解析)
}
{
rule_set:
[
push-ip
cn-ip
]
outbound: domestic
notice: cn ip 和 apple push ip 分流。
}
{
ip_is_private: true
outbound: domestic
notice: private ip 分流。
}
]
final: proxy
auto_detect_interface: true
find_process: false
default_mark: 2333
}
experimental:
{
cache_file:
{
enabled: true
path: ./src/cache.db
}
clash_api:
{
external_controller: 127.0.0.1:9909
external_ui: Dashboard
default_mode: Rule
secret: singBox
}
}
packages_list:
{
enabled: true
mode: black
black: []
white: []
notice:
'''
mode 有两个值,black or white
两个数组分别对应黑名单和白名单,目前名单里只允许填写包名
上个版本的 list 会根据 mode 自动转换成 black 和 white 两个数组里的值
'''
}
outbound_providers:
[
{
name: 国际
type: http
subLink: xxxxx
interval: 0
subInfo:
{
timeStamp: 1705847746075
check: true
support: true
info:
{
upload: 7441581922
download: 256182676008
total: 1382979469312
expire: 1709224198
}
}
timeStamp: 1705847746075
extra:
{
host: gw.alicdn.com
dta: true
}
}
]
}

本文转自 https://0730aa.github.io/2024/01/25/SingboxHjson/,如有侵权,请联系删除。