op 想使用 sing-box 在 iOS 手机上创建 vpn 然后连接家中公网 ip 暴露的 vmess 端口,家中的路由器自定义了一些域名,但是在 iOS 手机上访问域名无法打开家里面局域网的页面,直接使用 ip 访问却没问题,感觉应该是 DNS 解析出问题了。不过同样的配置( inbox 修改了一下,iOS 上使用 tun ,PC 上使用 http )在 PC 上测试了也是没问题,希望有了解的 V 友帮我解答一下,下面是我 iOS 上的配置文件
{
"dns": {
"servers": [
{
"tag": "local",
"address": "local",
"detour": "direct"
},
{
"tag": "home-dns",
"address": "192.168.0.1",
"detour": "home"
}
],
"rules": [
{
"domain_suffix": "app.home",
"server": "home-dns"
}
],
"strategy": "ipv4_only"
},
"inbounds": [
{
"type": "http",
"tag": "http-in",
"listen_port": 53530
},
{
"type": "tun",
"tag": "tun-in",
"interface_name": "tun0",
"inet4_address": "172.19.0.1/30",
"auto_route": true,
"strict_route": true,
"stack": "gvisor",
"sniff": true
}
],
"outbounds": [
{
"type": "direct",
"tag": "direct-out"
},
{
"tag": "home",
"type": "vmess",
"server": "server",
"server_port": 10000,
"uuid": "uuid",
"alter_id": 0,
"network": "tcp"
}
],
"route": {
"rules": [
{
"ip_cidr": [
"192.168.0.0/16"
],
"outbound": "home"
},
{
"domain_suffix": "app.home",
"outbound": "home"
}
],
"final": "direct-out"
}
}
1
afterain 136 天前
outbounds 中添加
{ "type": "dns", "tag": "dns-out" } route rules 中添加 { "protocol": "dns", "outbound": "dns-out" } |