Open EkkoG opened 7 months ago
1.16.0 正常 1.17.0 正常 1.18.0 有问题
c5d1db7905245f5947d3f6134617dd6123d6a054 有问题 f63acc02026c727ab40932a90a7231b26eb65577 有问题 f572e7fba8eeb13b448c4d01f4b6a2ed9944bd00 没有问题 2d73bcb951d82765cdce03da972a2a9d0e4c887f 没有问题
所以是由于 https://github.com/MetaCubeX/mihomo/commit/f63acc02026c727ab40932a90a7231b26eb65577 引入的问题
https://github.com/MetaCubeX/mihomo/commit/f572e7fba8eeb13b448c4d01f4b6a2ed9944bd00 也遇到过出错了,所以上面结论不准确,继续观察了
Verify steps
Mihomo version
Mihomo Meta alpha-e601130 darwin amd64 with go1.21.6 Tue Jan 30 11:42:09 UTC 2024 Use tags: with_gvisor
What OS are you seeing the problem on?
macOS
Mihomo config
Mihomo log
No response
Description
用的 Clash-Verge+1.18 内核,TUN 模式,Edge 浏览器,ss 代理节点,开了自动关闭连接,订阅 1 分钟刷新一次,刷新后访问 GitHub 就很容易遇到
Fastly error: unknown domain: github.com. Please check that this domain has been added to a service.
Details: cache-qpg1255-QPG
遇到这个错误后,在连接列表中查不到 github.com 的连接,刷新网页也不会有
出错信息
在出错时刷新网页,会一直对 198.18.0.5 这个 IP 进行请求
此时 dig github.com 会返回
在 edge://net-internals/#sockets 中 close idle sockets 后再刷新就能正常访问,并且连接列表中会正常出现 github.com,此时请求 IP 会变成一个新的 IP
在浏览器控制台中将出错的请求复制成 curl 命令并在终端执行,能得到 200 的结果,但是请求的不是在浏览器中请求的 IP,下面的例子中就是请求的 198.18.0.7,而在浏览器中持续报错的是 198.18.0.5
出错期间,可以用 lsof 看到一条始终存在的连接
❯ sudo lsof -n -i | grep -e LISTEN -e ESTABLISHED | grep Microsoft | grep 198.18.0.5: Microsoft 59325 ciel 43u IPv4 0x562c64df5e52fe51 0t0 TCP 198.18.0.1:62715->198.18.0.5:https (ESTABLISHED)
close idle sockets 后这条就不见了
再之后刷新网页,返回 200,但是 IP 已经变成了 198.18.0.7
在出错时,用 curl 请求,将 github.com 强制解析到有问题的 IP,也能正常访问
似乎是某种状态下会导致 fake-ip DNS 不失效,导致 Edge 一直对旧 IP 进行请求 或者连接没有正常关闭导致 Edge 不会请求新的 DNS
另外观察连接列表后发现在订阅刷新后并不会导致所有连接都断开
附上一点浏览器的日志 edge-net-export-log 2.json.zip