全局 tun 代理可解,给个 sing-box 的配置
```json
{
"log": {
"disabled": true,
"level": "info",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "google",
"address": "udp://8.8.8.8",
"detour": "socks-33"
},
{
"tag": "alidns",
"address": "223.5.5.5",
"detour": "direct"
}
],
"rules": [
{
"rule_set": ["geosite-gfw"],
"server": "google"
},
{
"rule_set": ["geosite-cn"],
"server": "alidns"
}
],
"strategy": "prefer_ipv4",
"final": "alidns"
},
"inbounds": [
{
"type": "mixed",
"tag": "mixed-in",
"listen": "127.0.0.1",
"listen_port": 10000,
"users": [
{
"username": "yj",
"password": "yj"
}
],
"tcp_fast_open": true,
"sniff": true,
"set_system_proxy": false
},
{
"type": "tun",
"tag": "tun-in",
"address": ["172.18.0.1/30"],
"auto_route": true,
"stack": "system",
"sniff": true
}
],
"outbounds": [
{
"type": "direct",
"tag": "direct"
},
{
"type": "socks",
"tag": "socks-33",
"server": "10.20.30.33",
"server_port": 20800,
"network": "tcp",
"tcp_fast_open": true
}
],
"route": {
"rules": [
{
"rule_set": ["geosite-cn"],
"outbound": "direct"
},
{
"rule_set": ["geosite-gfw"],
"outbound": "socks-33"
},
{
"domain_suffix": ["
codeium.com", "
windsurf.com","
v2ex.com"],
"outbound": "socks-33"
},
{
"port": 30099,
"outbound": "socks-33"
},
{
"domain": [
"
dl.google.com",
"
bfdx.com",
"
bfdx.net",
"
kicad99.com",
"
jetbrains.com",
"
aliyun.com",
"
aliyuncs.com",
"
npmmirror.com"
],
"outbound": "direct"
},
{
"ip_is_private": true,
"outbound": "direct"
},
{
"domain_suffix": [".cn"],
"outbound": "direct"
}
],
"auto_detect_interface": true,
"rule_set": [
{
"tag": "geosite-cn",
"type": "remote",
"format": "binary",
"url": "
https://fastly.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-cn.srs",
"download_detour": "direct"
},
{
"tag": "geosite-gfw",
"type": "remote",
"format": "binary",
"url": "
https://github.com/MetaCubeX/meta-rules-dat/raw/refs/heads/sing/geo/geosite/gfw.srs",
"download_detour": "socks-33"
}
]
}
}
```