声明:

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

特点

  1. 适用于国内中转,路由速度快。不建议过墙,过墙正统在 Xray-core VLESS
  2. 使用 Hysteria2Shadowsocks 2022 协议。Hysteria2 用于绕过校园网,走规则出站;Shadowsocks 2022 为普通中转,直接代理出站。
  3. 多节点最低延迟
  4. 白名单模式(绕过大陆)
  5. sing-box v1.11 及以上

配置

参考 sing-box windows 客户端配置,仅展示差异部分。

inbound

如:

inbound
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
[
{
"type": "mixed",
"tag": "local-route",
"listen": "127.0.0.1",
"listen_port": 10808
},
{
"type": "mixed",
"tag": "local-proxy",
"listen": "127.0.0.1",
"listen_port": 11818
},
{
"type": "shadowsocks",
"tag": "ss-in",
"listen": "::",
"listen_port": 14871,
"method": "2022-blake3-aes-128-gcm",
"password": "tIB6zzqu1U3tHKG/EkONfQ=="
},
{
"type": "hysteria2",
"tag": "hy2-in",
"listen": "::",
"listen_port": 7458,
"users": [
{
"password": "ysm5nLU1iNw0HYau"
}
],
"tls": {
"enabled": true,
"certificate_path": "/etc/sing-box/server.crt",
"key_path": "/etc/sing-box/server.key"
}
}
]

1080811818 可用于其他代理程序的出站,如 VLESS + Vision + REALITY 或 VMess + mKCP + dnshysteria2 的 tls 自签证书可参考:绕过校园网认证#生成自签证书

route_rules

route_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
[
{
"outbound": "proxy",
"clash_mode": "Global"
},
{
"outbound": "direct",
"clash_mode": "Direct"
},
{
"inbound": [
"local-proxy",
"ss-in"
],
"outbound": "proxy"
},
{
"action": "resolve"
},
{
"action": "sniff"
},
{
"protocol": "dns",
"action": "hijack-dns"
},
// ...
]

11818Shadowsocks 2022 的直接代理出站,减小延迟。

resolve sniff hijack-dns 没必要使用,增加延迟,但可能可以解决部分问题。

其他代理

可参考 Xray-core 服务端配置#中转配置