原理

singbox通过监听入站tun(就是代理服务器)并指定出站位置实现代理,直接更改路由表强制所有流量全走tun虚拟网卡实现全局的代理

curl.exe –socks5-hostname 127.0.0.1:1080 https://google.com -v

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
"log": {
"level": "trace"
},
"inbounds": [
{
"type": "socks",
"listen": "127.0.0.1",
"listen_port": 1080
}
],
"outbounds": [
{
"type": "direct"
}
]
}

主机->wsl(singbox-debug,监听127.0.0.1:1080并直接转发)->tun(singbox-systemctl对连接进行封装)->主机(clash代理端口)