libnyanpasu / clash-nyanpasu

Clash Nyanpasu~(∠・ω< )⌒☆​
https://nyanpasu.elaina.moe
GNU General Public License v3.0
9.51k stars 597 forks source link

Mac下关闭TUN模式后无法正常联网 #1793

Open sunjianan9900 opened 1 month ago

sunjianan9900 commented 1 month ago

复现步骤 / Step to reproduce

1.关闭TUN模式(或者直接退出clash) 2.Chrome、EDGE、safari等浏览器均无法正常访问国内网络(如百度),Teams掉线,但海外网站正常访问、微信仍然可以收发消息(公众号等文章页面无法打开) 3.开启TUN模式 百度等可以恢复访问,一切恢复正常

尝试关闭tun模式后使用“sudo killall -HUP mDNSResponder”清理DNS缓存,也没有恢复网络访问

预期行为 / Expected behavior

关闭TUN模式可以正常上百度

实际行为 / Actual behavior

关闭TUN模式无法访问国内网络

应用日志 / App logs

关闭TUN模式后会有一个警告: 10-16 18:47:37 WARNING [TCP] dial 漏网之鱼 (match Match/) mihomo --> xxxx:33943 error: dns resolve failed: all DNS requests failed, first error: xxxxxx:443 connect error: dns resolve failed: context deadline exceeded

备注 / Addition details

No response

环境信息 / Environment information

----------- System ----------- OS: MacOS 14.5 23.5.0 Arch: arm64 ----------- Device ----------- CPU: Apple M1 @ 3.20GHz x 8 Memory: 16 GiB ----------- Core ----------- clash: Clash n2023-09-05-gdcc8d87 darwin arm64 with go1.21.0 Tue Sep 5 14:20:06 UTC 2023 mihomo-alpha: Mihomo Meta alpha-ade4234 darwin arm64 with go1.23.1 Sat Sep 7 12:22:55 UTC 2024 Use tags: with_gvisor clash-rs: clash-rs 0.3.1 mihomo: Mihomo Meta v1.18.8 darwin arm64 with go1.23.0 Mon Sep 2 08:35:10 UTC 2024 Use tags: with_gvisor ----------- Build Info ----------- App Name: clash-nyanpasu App Version: 0.1.0 Pkg Version: 1.6.1 Commit Hash: 07312702907e7cb459427f41dc7fd2b1bd270e6b Commit Author: github-actions[bot] Commit Date: 2024-09-07T16:09:54.000Z Build Date: 2024-09-07T16:51:07.599Z Build Profile: Release Build Platform: aarch64-apple-darwin Rustc Version: rustc 1.83.0-nightly (26b5599e4 2024-09-06) Llvm Version: 19.1

自查步骤 / Verify steps

sunjianan9900 commented 1 month ago

是否有手动清理TUN影响的方案呢?我现在退出clash、重启MAC,都无法恢复百度等的访问了

greenhat616 commented 1 month ago

系统接口,例如 Wi-Fi, dns 改回默认

github-actions[bot] commented 6 days ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

greenhat616 commented 6 days ago

Not Stale

ldiex commented 2 days ago

同样的问题, 参考解决方案: 先用netstat删除所有的tun interface (ref: https://serverfault.com/questions/1129536/how-to-delete-utun0-in-my-macos), 然后重启即可