[Bug]: 关于在预设V3-绕过大陆路由规则下Shadowsocks切换至sing-box 内核时 gstatic.com 无法访问 导致Google登录出现静态资源无法获取 点击登录无反应 #5383
Replies: 8 comments 9 replies
-
已经使用 检查更新 按钮 更新了 软件版本 sing-box版本 和 geofiles |
Beta Was this translation helpful? Give feedback.
-
似乎并不存在 #4561 #4561 (comment) 中的 插件问题 |
Beta Was this translation helpful? Give feedback.
-
因为singbox里把它列入代理列表里,但是解析出来的ip是国内的,xray这边就直连了,你把gstatic.com在路由配置里把它加入代理里,让两者路由一致即可,这个域名我这里一直是列入代理的,不影响Google登录。 |
Beta Was this translation helpful? Give feedback.
-
Uploading 全局模式.mp4… https://github.com/user-attachments/assets/ddd42807-d899-4366-9ce7-f54c25b5ac1a |
Beta Was this translation helpful? Give feedback.
-
这个问题我碰到过,是xray的dns匹配规则和sing-box不太一样导致的。xray的长这样:
xray先匹配geosite:cn和geosite:geolocation-cn,以及geoip:cn,然后将剩下的全部发往国外,也就是对国内采取的一网打尽的态度。sing-box上来使用的geosite-geolocation-!cn会遗漏相当多的域名,总体不建议使用。 这里再多说两句关于TUN的DNS解析问题。TUN模式底下,很多表面上是规则集解析问题,但事实上是 Chrome/Firefox 的安全DNS导致的。Clash的文档也有提到这个:https://docs.gtk.pw/contents/tun.html 。简而言之,TUN模式为了得到域名以便走不同的规则,需要对自己进行中间人攻击(也就是域名嗅探)来得到域名和IP,开启安全DNS之后所有的域名请求全部看起来都是HTTPS,域名嗅探就不能生效了,DNS请求会全部发到(需要proxy才能到的)国外,导致速度奇慢以及超时。而如果浏览器检测到有系统代理或者VPN,会自动关闭这个功能(至少Firefox是这样),所以系统代理模式就会感觉比TUN快: |
Beta Was this translation helpful? Give feedback.
-
使用代理时都建议浏览器关闭安全dns,特别是有透明代理的路由器里,这是因为开启安全dns会绕过dns劫持,对于v2rayN来说,最好建议将xray的路由策略默认为AsIs,因为路由分流主要在singbox,我在#5287提到过,而且保证singbox和xray的geo文件来源一致即可,最新的singbox已经不兼容xray的geo文件了 |
Beta Was this translation helpful? Give feedback.
-
移除路由设置里面直连的 geosite:cn 规则就可以解决这个问题了 |
Beta Was this translation helpful? Give feedback.
-
预期情况
切换至sing-box 内核时 gstatic.com 应该走国内分流
实际情况
在预设V3-绕过大陆路由规则下Shadowsocks协议切换至sing-box 内核时 gstatic.com 无法访问 这个网站需要cn内访问但是似乎被错误解析了 导致访问失败,但是开启全局代理会可以访问,但这应该并不是正常的。
复现方法
日志信息
以下时切换至sing-box内核时的日志信息 【似乎是因为命中了match[1] rule_set=geosite-geolocation-!cn => remote】
+0800 2024-07-18 18:40:15 INFO [1131983404 0ms] inbound/http[http]: inbound connection from 127.0.0.1:63466
+0800 2024-07-18 18:40:15 INFO [1131983404 0ms] inbound/http[http]: inbound connection to www.gstatic.com:443
+0800 2024-07-18 18:40:15 DEBUG [1131983404 0ms] router: sniffed protocol: tls, domain: www.gstatic.com
+0800 2024-07-18 18:40:15 DEBUG [1131983404 0ms] router: match[4] rule_set=[geosite-cn geosite-geolocation-cn] => direct
+0800 2024-07-18 18:40:15 INFO [1131983404 0ms] outbound/direct[direct]: outbound connection to www.gstatic.com:443
+0800 2024-07-18 18:40:15 DEBUG [1131983404 0ms] dns: lookup domain www.gstatic.com
+0800 2024-07-18 18:40:15 DEBUG [1131983404 0ms] dns: match[1] rule_set=geosite-geolocation-!cn => remote
+0800 2024-07-18 18:40:15 INFO outbound/shadowsocks[proxy]: outbound connection to 8.8.8.8:53
+0800 2024-07-18 18:40:15 DEBUG [1131983404 108ms] dns: lookup failed for www.gstatic.com: context canceled
+0800 2024-07-18 18:40:15 DEBUG [1131983404 108ms] inbound/http[http]: connection closed: process connection from 127.0.0.1:63466: context canceled
+0800 2024-07-18 18:40:15 INFO [288332285 0ms] inbound/http[http]: inbound connection from 127.0.0.1:63468
+0800 2024-07-18 18:40:15 INFO [288332285 0ms] inbound/http[http]: inbound connection to www.gstatic.com:443
+0800 2024-07-18 18:40:15 DEBUG [288332285 0ms] router: sniffed protocol: tls, domain: www.gstatic.com
+0800 2024-07-18 18:40:15 DEBUG [288332285 0ms] router: match[4] rule_set=[geosite-cn geosite-geolocation-cn] => direct
+0800 2024-07-18 18:40:15 INFO [288332285 0ms] outbound/direct[direct]: outbound connection to www.gstatic.com:443
+0800 2024-07-18 18:40:15 DEBUG [288332285 0ms] dns: lookup domain www.gstatic.com
+0800 2024-07-18 18:40:15 DEBUG [288332285 0ms] dns: match[1] rule_set=geosite-geolocation-!cn => remote
+0800 2024-07-18 18:40:15 INFO outbound/shadowsocks[proxy]: outbound connection to 8.8.8.8:53
+0800 2024-07-18 18:40:16 DEBUG [288332285 93ms] dns: lookup failed for www.gstatic.com: context canceled
+0800 2024-07-18 18:40:16 DEBUG [288332285 93ms] inbound/http[http]: connection closed: process connection from 127.0.0.1:63468: context canceled
+0800 2024-07-18 18:40:16 INFO [1348730283 0ms] inbound/http[http]: inbound connection from 127.0.0.1:63470
+0800 2024-07-18 18:40:16 INFO [1348730283 0ms] inbound/http[http]: inbound connection to edge.microsoft.com:443
+0800 2024-07-18 18:40:16 DEBUG [1348730283 1ms] router: sniffed protocol: tls, domain: edge.microsoft.com
+0800 2024-07-18 18:40:16 DEBUG [1348730283 1ms] router: match[6] port_range=0:65535 => proxy
额外信息
在使用Xray内核下 日志如下 【似乎是走的直连】
2024/07/18 18:41:48 [Info] [1292794750] proxy/http: request to Method [CONNECT] Host [www.gstatic.com:443] with URL [//www.gstatic.com:443]
2024/07/18 18:41:48 [Info] [1292794750] app/dispatcher: sniffed domain: www.gstatic.com
2024/07/18 18:41:48 [Info] [1292794750] app/dispatcher: taking detour [direct] for [tcp:www.gstatic.com:443]
2024/07/18 18:41:48 [Info] [1292794750] transport/internet/tcp: dialing TCP to tcp:www.gstatic.com:443
2024/07/18 18:41:48 [Debug] transport/internet: dialing to tcp:www.gstatic.com:443
2024/07/18 18:41:48 127.0.0.1:63499 accepted //www.gstatic.com:443 [http -> direct]
2024/07/18 18:41:48 [Info] [1292794750] proxy/freedom: connection opened to tcp:www.gstatic.com:443, local endpoint 192.168.184.136:63500, remote endpoint 203.208.41.34:443
2024/07/18 18:41:48 [Info] [1292794750] proxy: CopyRawConn readv
2024/07/18 18:41:51 [Info] [999262526] proxy/http: request to Method [HEAD] Host [msedge.b.tlu.dl.delivery.mp.microsoft.com] with URL [http://msedge.b.tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/da421fd3-a679-418c-8790-7cfcec77ad0a?P1=1721885113&P2=404&P3=2&P4=Ac8hAd6CPfPl%2fLiuzkM3HWZg3qW1v1N5iigAe%2bUTi9gtEtRTCKPo%2b3dAnJd5EOuJ8vYWr61I3wDQ1qmeZeokmA%3d%3d]
2024/07/18 18:41:51 [Info] [999262526] app/dispatcher: taking detour [direct] for [tcp:msedge.b.tlu.dl.delivery.mp.microsoft.com:80]
2024/07/18 18:41:51 [Info] [999262526] transport/internet/tcp: dialing TCP to tcp:msedge.b.tlu.dl.delivery.mp.microsoft.com:80
2024/07/18 18:41:51 [Debug] transport/internet: dialing to tcp:msedge.b.tlu.dl.delivery.mp.microsoft.com:80
2024/07/18 18:41:51 127.0.0.1:63494 accepted http://msedge.b.tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/da421fd3-a679-418c-8790-7cfcec77ad0a?P1=1721885113&P2=404&P3=2&P4=Ac8hAd6CPfPl%2fLiuzkM3HWZg3qW1v1N5iigAe%2bUTi9gtEtRTCKPo%2b3dAnJd5EOuJ8vYWr61I3wDQ1qmeZeokmA%3d%3d [http -> direct]
2024/07/18 18:41:51 [Info] [999262526] proxy/freedom: connection opened to tcp:msedge.b.tlu.dl.delivery.mp.microsoft.com:80, local endpoint 192.168.184.136:63501, remote endpoint 222.220.212.5:80
2024/07/18 18:41:51 [Info] [999262526] proxy: CopyRawConn readv
2024/07/18 18:41:51 [Info] [999262526] proxy/http: request to Method [GET] Host [msedge.b.tlu.dl.delivery.mp.microsoft.com] with URL [http://msedge.b.tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/da421fd3-a679-418c-8790-7cfcec77ad0a?P1=1721885113&P2=404&P3=2&P4=Ac8hAd6CPfPl%2fLiuzkM3HWZg3qW1v1N5iigAe%2bUTi9gtEtRTCKPo%2b3dAnJd5EOuJ8vYWr61I3wDQ1qmeZeokmA%3d%3d]
2024/07/18 18:41:51 [Info] [999262526] app/dispatcher: taking detour [direct] for [tcp:msedge.b.tlu.dl.delivery.mp.microsoft.com:80]
2024/07/18 18:41:51 [Info] [999262526] transport/internet/tcp: dialing TCP to tcp:msedge.b.tlu.dl.delivery.mp.microsoft.com:80
2024/07/18 18:41:51 127.0.0.1:63494 accepted http://msedge.b.tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/da421fd3-a679-418c-8790-7cfcec77ad0a?P1=1721885113&P2=404&P3=2&P4=Ac8hAd6CPfPl%2fLiuzkM3HWZg3qW1v1N5iigAe%2bUTi9gtEtRTCKPo%2b3dAnJd5EOuJ8vYWr61I3wDQ1qmeZeokmA%3d%3d [http -> direct]
2024/07/18 18:41:51 [Debug] transport/internet: dialing to tcp:msedge.b.tlu.dl.delivery.mp.microsoft.com:80
2024/07/18 18:41:51 [Info] [999262526] proxy/freedom: connection opened to tcp:msedge.b.tlu.dl.delivery.mp.microsoft.com:80, local endpoint 192.168.184.136:63502, remote endpoint 222.220.212.5:80
2024/07/18 18:41:51 [Info] [999262526] proxy: CopyRawConn readv
我确认已更新至最新版本
我确认已查询历史issues
Beta Was this translation helpful? Give feedback.
All reactions