Closed zihelyu closed 7 months ago
Sorry, this problem is due to the docker network card
感觉跟Docker网卡没关系,应该是Linux不支持作为Client使用Tun
@zihelyu 请教下,如何解决的?我也遇到同样问题了
@zihelyu请教下,如何解决的?我也遇到了同样的问题
strict_route设置为false,关闭严格路由就好了
@zihelyu
{
"dns": {
"servers": [
{
"tag": "google",
"address": "tls://8.8.8.8"
},
{
"tag": "local",
"address": "223.5.5.5",
"detour": "direct"
}
],
"rules": [
{
"geosite": "cn",
"server": "local"
}
],
"strategy": "ipv4_only"
},
"inbounds": [
{
"type": "tun",
"inet4_address": "172.19.0.1/30",
"auto_route": true,
"sniff": true,
"strict_route":false
}
],
"outbounds": [
{
"type": "vmess",
"tag": "hk",
"server": "38.38.38.38",
"server_port": 3838,
"uuid": "803ef998-fbdd-2404-989f-cdb16482d3b9",
"alter_id": 0,
"security": "auto",
"network": "tcp",
"tcp_fast_open": false
},
{
"type": "direct",
"tag": "direct"
},
{
"type": "block",
"tag": "block"
},
{
"type": "dns",
"tag": "dns-out"
}
],
"route": {
"rules": [
{
"protocol": "dns",
"outbound": "dns-out"
},
{
"geosite": "category-ads-all",
"outbound": "block"
},
{
"geosite": "cn",
"geoip": "cn",
"outbound": "direct"
},
{
"domain_suffix": [
"google.com"
],
"outbound": "hk"
}
],
"auto_detect_interface": true
}
}
感谢回复。可我这样的配置 ,docker服务 外网还是访问不了
@zihelyu
{ "dns": { "servers": [ { "tag": "google", "address": "tls://8.8.8.8" }, { "tag": "local", "address": "223.5.5.5", "detour": "direct" } ], "rules": [ { "geosite": "cn", "server": "local" } ], "strategy": "ipv4_only" }, "inbounds": [ { "type": "tun", "inet4_address": "172.19.0.1/30", "auto_route": true, "sniff": true, "strict_route":false } ], "outbounds": [ { "type": "vmess", "tag": "hk", "server": "38.38.38.38", "server_port": 3838, "uuid": "803ef998-fbdd-2404-989f-cdb16482d3b9", "alter_id": 0, "security": "auto", "network": "tcp", "tcp_fast_open": false }, { "type": "direct", "tag": "direct" }, { "type": "block", "tag": "block" }, { "type": "dns", "tag": "dns-out" } ], "route": { "rules": [ { "protocol": "dns", "outbound": "dns-out" }, { "geosite": "category-ads-all", "outbound": "block" }, { "geosite": "cn", "geoip": "cn", "outbound": "direct" }, { "domain_suffix": [ "google.com" ], "outbound": "hk" } ], "auto_detect_interface": true } }
感谢回复。可我这样的配置 ,docker服务 外网还是访问不了
试一下
"inbounds": [ { "type": "tun", "inet4_address": "172.19.0.1/30", "auto_route": true, "stack": "gvisor", "sniff": true } ]
@zihelyu
"inbounds": [
{
"type": "tun",
"inet4_address": "172.19.0.1/30",
"auto_route": true,
"stack": "gvisor",
"sniff": true
}
]
试了也不行😭 +"strict_route": false 也不行
Operating system
Linux
System version
debian
Installation type
Original sing-box Command Line
If you are using a graphical client, please provide the version of the client.
No response
Version
Description
使用sing-box run运行后tun代理正常工作,ssh也可以连接,但是nginx和mysql的端口只能从localhost能访问,不可以被外部访问了
Reproduction
配置文件
Logs
No response