Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netch可能有DNS泄漏的问题 #893

Closed
egg1234 opened this issue Jul 26, 2022 · 9 comments
Closed

netch可能有DNS泄漏的问题 #893

egg1234 opened this issue Jul 26, 2022 · 9 comments
Labels
bug Something isn't working Stale

Comments

@egg1234
Copy link

egg1234 commented Jul 26, 2022

错误描述

使用netch 1.9.7,配置出口代理后,设置选项使用软件自己缺省的参数,没有改变,点启动,然后使用firefox或chrome浏览器,访问https://dnsleaktest.com/ 网站,网页出来后点Extended test按钮进行DNS泄漏测试,结果出来后就会发现既有远程的cloudflare的DNS地址,也有国内运营商的DNS地址

同样的测试使用v2rayN,启动自动配置代理后,同样使用firefox或chrome浏览器,访问https://dnsleaktest.com/ 网站,网页出来后点Extended test按钮进行DNS泄漏测试,结果出来后就会发现只有远程代理服务器的DNS地址

出口代理使用vmess或局域网原有的socks5代理都一样

复现步骤

1.使用netch 1.9.7,配置出口代理,代理规则是bypass lan and china
2.设置选项使用软件自己缺省的参数,没有改变,点启动
3.使用firefox或chrome浏览器,访问https://dnsleaktest.com/ 网站,网页出来后点Extended test按钮进行DNS泄漏测试,结果出来后就会发现既有远程的cloudflare的DNS地址,也有国内运营商的DNS地址

日志

日志没有特别的地方,都是正常的访问

操作环境

windows 10 21H2 19044.1826

额外信息

No response

@egg1234 egg1234 added the bug Something isn't working label Jul 26, 2022
@Smallthing
Copy link

没看更新说明吗?自定义dns关了吗

@egg1234
Copy link
Author

egg1234 commented Jul 27, 2022

已经测试点 设置->WinTun->点选“使用自定义DNS”及“代理DNS”,然后把DNS框里面改成8.8.8.8
重新启动netch,使用firefox或chrome浏览器,访问https://dnsleaktest.com/ 网站,网页出来后点Extended test按钮进行DNS泄漏测试,结果出来后就会发现既有google的DNS地址,也有国内运营商的DNS地址
情况与使用软件缺省设置的情况基本一样,只不过软件缺省情况是用cloudflare的DNS加国内运营商的DNS地址
忘了补充,如果在自定义DNS里面写9.9.9.9,那么测试出来的DNS会是WoodyNet的DNS加国内运营商的DNS地址,至少证明自定义DNS是工作的,不过就是DNS查询有泄漏的情况

@egg1234
Copy link
Author

egg1234 commented Aug 13, 2022

经过反复验证,引起问题的原因应该有两个,第一个是由于pc机的网卡设置了国内的DNS地址,第二个是netch使用了类似gwflist的方式(这个是从结果猜想的)

代理规则是选择“bypass lan”或“bypass lan and china”都无所谓

首先如果把pc机的网卡设置DNS地址为1.0.0.1或9.9.9.9,并且wintun选择自定义DNS,
那么dnsleaktest.com网站测试出来全部都是CF或Quard9的DNS地址

如果把pc机的网卡设置了国内的DNS地址,并且wintun选择自定义DNS,
那么dnsleaktest.com网站测试出来的DNS既有国内DNS也有国外DNS,
如果这时把wintun选择自定义DNS关闭了,那么所有被封网站都是访问不了的,
但dnsleaktest.com网站继续可以访问并同样测试出来的DNS既有国内DNS也有国外DNS,
从这两个测试结果猜想netch 1.97使用了类似gfwlist方式而不是大陆白名单方式,
所以dnsleaktest.com网站被netch判断为不是被封的网站,所以使用本地网卡的国内DNS进行解析,导致dnsleaktest.com网站测试出国内的DNS地址

另外如果wintun不选择自定义DNS,而使用AioDNS的话,被封网站是无论如何都访问不了的

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the Stale label Sep 13, 2022
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@egg1234
Copy link
Author

egg1234 commented Nov 22, 2022

解决方法是把本机物理网卡的DNS设置成127.0.0.1,然后勾选wintun的“使用自定义DNS”及“代理DNS”这样就没有DNS泄漏了

@MaplerK
Copy link

MaplerK commented Dec 26, 2023

解决方法是把本机物理网卡的DNS设置成127.0.0.1,然后勾选wintun的“使用自定义DNS”及“代理DNS”这样就没有DNS泄漏了

樓主有嘗試過如何在進程模式中避免DNS泄露嗎?將chrome、firefox等設為進程模式,皆出現了dns泄露的問題。

@egg1234
Copy link
Author

egg1234 commented Dec 26, 2023

@MaplerK 现在已经不用netch了,使用 https://github.com/MatsuriDayo/nekoray ,然后使用tun模式的白名单模式设置代理的进程,虽然原理与进程模式不一样,但结果是一样,并且nekoray的tun模式的DNS处理已经被非常多的版本迭代处理得非常完美了,只要按照https://github.com/MatsuriDayo/nekoray/issues/ 915的方法设置就完全没有DNS泄露问题

@2LC16
Copy link

2LC16 commented Feb 25, 2024

非常好的回复,感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Development

No branches or pull requests

4 participants