@
zidekuls 用 v2ray 或者 sing-box 做一层桥接即可,我推荐使用 sing-box ;之前回复提到的方法可以优化,只需要注意在 sing-box 配置 warp 出站的 socks 协议为 socks4 版本即可,其他系统 dns 什么的都不需要再修改了; v2ray 或者 sing-box 的 gui 一般都会默认本地开启一个 socks5 服务器,其他设备或者浏览器用 socks5 协议连接即可。
直接使用 sing-box 内核的话,配置文件参考如下:
{
"log":{
"disabled":false,
"level":"info",
"timestamp":true
},
"dns":{
"independent_cache":true,
"servers":[
{
"tag":"cf",
"address":"tls://1.1.1.1/dns-query",
"detour":"warp"
},
{
"tag":"local",
"address":"tls://223.5.5.5",
"detour":"direct"
},
{
"tag":"rcode",
"address":"rcode://success"
}
],
"rules":[
{
"geosite":"cn",
"server":"local"
}
]
},
"inbounds":[
{
"type":"mixed",
"tag":"mixed-in",
"listen":"::",
"listen_port":2080,
"sniff":true
}
],
"outbounds":[
{
"type":"direct",
"tag":"direct"
},
{
"tag":"warp",
"type":"socks",
"version":"4",
"server":"127.0.0.1",
"server_port":40000
},
{
"type":"block",
"tag":"block"
},
{
"type":"dns",
"tag":"dns-out"
}
],
"route":{
"final":"direct",
"auto_detect_interface":true,
"rules":[
{
"protocol":"dns",
"outbound":"dns-out"
},
{
"geosite":"category-ads-all",
"outbound":"block"
},
{
"geosite":"cn",
"geoip":[
"cn",
"private"
],
"outbound":"direct"
}
]
}
}