guozozo: debian12 系统,安装了 mihomo 服务,启用了 tun 模式。用 docker 安装了 ss ,配置端口 12345 ,做好了端口映射。
启动 tun 模式时,无法连接上 ss ,关闭 tun 模式,可以正常连接上 ss 回内网。
配置如下:
# tun 模式
tun:
enable: true # enable 'true'
stack: system # or 'gvisor'
dns-hijack:
- "any:53"
- "tcp://any:53"
auto-route: true
auto-detect-interface: true
strict-route: true
mtu: 1500
device: tun0
# 如果有使用 zerotier 或者 headscale 等,需要自己配置排除自己的网段
# route-exclude-address: ["192.168.110.0/24"]
route-exclude-address:
- 10.8.8.0/24 #内网 ip
路由信息:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.8.8.1 0.0.0.0 UG 0 0 0 enp5s0
10.8.8.0 0.0.0.0 255.255.252.0 U 0 0 0 enp5s0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.19.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-9f99afa8b3a2
198.18.0.0 0.0.0.0 255.255.255.252 U 0 0 0 tun0
10.8.8.1 是主路由器。
有大佬知道是什么问题么?感觉像是路由表没有配好。
Read More