xiaorouji / openwrt-passwall

6.75k stars 2.58k forks source link

[Bug]: 使用4.70-10的sing-box核心,运行v2ray,导致UltraMobile的wifi calling功能无法开启 #2856

Closed Jasonzhang2023 closed 9 months ago

Jasonzhang2023 commented 9 months ago

描述您遇到的bug

感谢大神的passwall,每次更新断断续续的都在更新,非常的棒!

自4.69版本升级为4.70-10后,发现sing-box内核运行的v2ray,会导致域名解析出问题,导致解析地址不一致,因此Ultramobile的wifi calling无法开启。

复现此Bug的步骤

1、自由上网完全没问题,非常的棒,只是4.70-10版本会导致解析出问题 2、本人安装了adguardhome,可以看到解析的网址域名,由于adguardhome导出来不直观,我将服务器端v2ray的日志导出: 2.1、使用hysteria2的核心,用sock5连接到v2ray分流,因此是127.0.0.1的地址,它反应出的IP解析地址是准确的,均为208.54.2.163(500及4500端口,必须解析地址一致,UDP工作,wifi calling才能开启,后续4500为通话保持端口) 2.2、使用sing-box的科学上网,是221.164.105.78的地址,它反应出的IP解析地址是不准确的,一会儿是208.54.2.163、一会儿是 208.54.39.163、208.54.159.227等,因为500和4500解析不一致,导致wifi calling无法开启。 2.3、切换为hysteria2,wifi calling立刻恢复,表现出的服务器日志是500及4500解析地址一致。

root@yg:~# tail -f v2ray-access.log |grep 208.54 2023/10/12 20:06:48 udp:127.0.0.1:29374 accepted udp:208.54.2.163:500 [IPv4_out] 2023/10/12 20:06:49 udp:127.0.0.1:11140 accepted udp:208.54.2.163:4500 [IPv4_out] 2023/10/12 20:08:52 udp:127.0.0.1:11140 accepted udp:208.54.2.163:4500 [IPv4_out] 2023/10/12 20:10:52 udp:127.0.0.1:11140 accepted udp:208.54.2.163:4500 [IPv4_out] 2023/10/12 20:12:52 udp:127.0.0.1:11140 accepted udp:208.54.2.163:4500 [IPv4_out] 2023/10/12 20:14:52 udp:127.0.0.1:11140 accepted udp:208.54.2.163:4500 [IPv4_out] 2023/10/12 20:15:12 udp:127.0.0.1:4388 accepted udp:208.54.2.163:4500 [IPv4_out] 2023/10/12 20:18:12 udp:127.0.0.1:4388 accepted udp:208.54.2.163:4500 [IPv4_out] 2023/10/12 20:19:53 221.164.105.78:0 accepted udp:208.54.2.163:4500 [IPv4_out] email: password11@gmail.com 2023/10/12 20:20:28 221.164.105.78:0 accepted udp:208.54.39.163:500 [IPv4_out] email: password11@gmail.com 2023/10/12 20:20:51 221.164.105.78:0 accepted udp:208.54.39.163:500 [IPv4_out] email: password11@gmail.com 2023/10/12 20:22:09 221.164.105.78:0 accepted udp:208.54.34.3:500 [IPv4_out] email: password11@gmail.com 2023/10/12 20:23:34 221.164.105.78:0 accepted udp:208.54.2.163:500 [IPv4_out] email: password11@gmail.com 2023/10/12 20:24:54 221.164.105.78:0 accepted udp:208.54.159.227:500 [IPv4_out] email: password11@gmail.com 2023/10/12 20:26:14 221.164.105.78:0 accepted udp:208.54.159.227:500 [IPv4_out] email: password11@gmail.com 2023/10/12 20:27:34 221.164.105.78:0 accepted udp:208.54.39.3:500 [IPv4_out] email: password11@gmail.com 2023/10/12 20:28:54 221.164.105.78:0 accepted udp:208.54.2.163:500 [IPv4_out] email: password11@gmail.com 2023/10/12 20:30:14 221.164.105.78:0 accepted udp:208.54.2.163:500 [IPv4_out] email: password11@gmail.com 2023/10/12 20:31:34 221.164.105.78:0 accepted udp:208.54.2.163:500 [IPv4_out] email: password11@gmail.com 2023/10/12 20:33:15 221.164.105.78:0 accepted udp:208.54.34.3:500 [IPv4_out] email: password11@gmail.com 2023/10/12 20:34:34 221.164.105.78:0 accepted udp:208.54.34.3:500 [IPv4_out] email: password11@gmail.com 2023/10/12 20:34:36 udp:127.0.0.1:35390 accepted udp:208.54.34.3:4500 [IPv4_out] 2023/10/12 20:35:06 udp:127.0.0.1:35386 accepted udp:208.54.2.163:500 [IPv4_out] 2023/10/12 20:35:07 udp:127.0.0.1:56415 accepted udp:208.54.2.163:4500 [IPv4_out] 2023/10/12 20:37:12 udp:127.0.0.1:56415 accepted udp:208.54.2.163:4500 [IPv4_out]

3、之前使用4.66或4.69版本,v2ray内核,都是秒开wifi calling;升级sing box的死活无法开启wifi calling

您想要实现的目的

如何使得采用singbox运行解析时,得到准确的解析地址。

日志信息

日志都比较正常,无报错

截图

No response

系统相关信息

4.70-10 sing box核心运行vmess

其他信息

本人小白,纯靠网络上各路大神的无私奉献拼拼凑凑,得以科学上网,学习知识。再次感谢各位无私奉献的大牛!

Jasonzhang2023 commented 9 months ago

今天刚刚更新了4.71-1,singbox的问题依旧(hysteria2可开启wifi calling)

Jasonzhang2023 commented 9 months ago

有一种可能是,singbox无法遵循passwall的规则列表。因为我将几个dns查询的地址都使用代理,但从dns服务器上看,依旧有来自未经过代理的请求

Jasonzhang2023 commented 9 months ago

有一种可能是,singbox无法遵循passwall的规则列表。因为我将几个dns查询的地址都使用代理,但从dns服务器上看,依旧有来自未经过代理的请求 sing-box未遵循代理规则,有直接连接地址: singbox未遵循passwall规则

hysteria2.0遵循,都是代理地址: hysteria2走的是passwall规则,都用代理地址

Jasonzhang2023 commented 9 months ago

经过1天测试,切换为Xray内核运行,突然发现可以打开wifi calling,singbox依旧不行。 我通过现象发现是这样的: 1、Xray内核,vps上v2ray-access.log,流入的是域名,而不是IP 2023/10/14 19:32:18 221.164.105.78:0 accepted tcp:api.twitter.com:443 [USA_out2] email: password11@gmail.com 2023/10/14 19:32:20 221.164.105.78:0 accepted tcp:alive.github.com:443 [IPv4_out] email: password11@gmail.com 2023/10/14 19:32:34 tcp:221.164.105.78:0 accepted udp:208.54.2.163:4500 [IPv4_out] email: password11@gmail.com

2、sing-box内核,vps上v2ray-access.log,流入的是IP,而不是域名

2023/10/14 19:41:22 221.164.105.78:0 accepted tcp:8.8.4.4:853 [IPv4_out] email: password11@gmail.com 2023/10/14 19:41:22 221.164.105.78:0 accepted tcp:192.229.232.217:443 [USA_out2] email: password11@gmail.com 2023/10/14 19:41:23 221.164.105.78:0 accepted tcp:192.229.232.217:443 [USA_out2] email: password11@gmail.com

因此我个人判断可能是singbox已经把域名解析为IP传输给vps主机,而xray是将未解析的域名传递给vps主机。 而正是这提前的singbox做的DNS域名解析,导致wifi calling无法开启。

个人判断,请作者大神看看具体原因。

smallprogram commented 9 months ago

我觉得你是不是应该去sing-box库提交一下issue

dracula-s commented 9 months ago

好像是有问题,用sing-box运行tuic v5也遇到这种情况了。安卓上又没问题。

Jasonzhang2023 commented 9 months ago

我觉得你是不是应该去sing-box库提交一下issue

嗯,后续我去提一下

xiaorouji commented 9 months ago

sniff_override_destination 了解一下

Jasonzhang2023 commented 9 months ago

sniff_override_destination 了解一下

报告大佬,嗅探我有开的。如果是hysteria2过来的,是用: { "listen": "127.0.0.1", "port": 18802, "protocol": "socks", "settings": { "auth": "noauth", "udp": true}, "sniffing":{ "enabled":true, "destOverride":[ "http", "tls", "quic", "fakedns" ] } } 如果是V2ray的,是: "sniffing":{ "enabled":true, "destOverride":[ "http", "tls", "quic", "fakedns"

            ]
        }
Gzxhwq commented 9 months ago

sing-box不保证双端不一致情况下的udp行为

https://sing-box.sagernet.org/examples/fakeip/ (if the server is not sing-box, UDP may not work due to wrong behavior)

Jasonzhang2023 commented 9 months ago

sing-box不保证双端不一致情况下的udp行为

https://sing-box.sagernet.org/examples/fakeip/ (if the server is not sing-box, UDP may not work due to wrong behavior)

很有可能,两端不一致我估计是比较容易出问题。感谢大佬解析。 我先关闭此问题,后续有问题再一起讨论