Giter Club home page Giter Club logo

Comments (7)

PikuZheng avatar PikuZheng commented on July 1, 2024

停用双栈优选后应同时提供A记录和AAAA记录。大部分终端(比如windows,android)都会优先使用ipv6。可以用 ping 域名测试。
如果是确定的域名要禁用ipv4,可以使用 address限制。

from smartdns.

1000oaks avatar 1000oaks commented on July 1, 2024

经查看 about:networking#dns ,发现Firefox默认使用每一条记录中的第1个地址。
平时我的流量在Linux上走某软件的TUN模式(对于少部分域名,在SmartDNS设置中将这些域名的请求转发至该软件,但是所有流量都过TUN网卡)。发现在关闭/禁用该软件后,Firefox部分网址的DNS缓存记录中IPv4和IPv6的顺序发生倒转(从而域名改走IPv6),但是发生倒转的域名的DNS请求是直接通过SmartDNS完成的,DNS请求没有转发给某软件,但是nslookup的记录仍然是IPv4在前、IPv6在后。
我水平不足,目前暂无法理解这件事情的产生原因。
Screenshot from 2024-04-22 20-03-15
Screenshot from 2024-04-22 20-04-02

from smartdns.

PikuZheng avatar PikuZheng commented on July 1, 2024

我不用firefox,建议试试edge或chrome看有没有相同问题,另外用ff打开测试页面 http://detectportal.firefox.com/success.txt?ipv6 如果ff觉得ipv6不通,它就不会选用ipv6

另一方面ipv4和ipv6实际上是两次dns查询,那个显示的顺序我觉得不重要

from smartdns.

1000oaks avatar 1000oaks commented on July 1, 2024

打开该 http://detectportal.firefox.com/success.txt?ipv6 测试页面后,出现 success ,通。

之前我了解到SmartDNS 版本45可将自身封装为本地DoH,于是我注册了一域名(此处用 www.mydomain.com 代指),将此域名的DNS解析记录指向了 127.0.0.1 ,并将此域名的SSL证书用给了SmartDNS的本地DoH服务器。

我在Firefox中将 https://www.mydomain.com (代指)设置为了DoH服务器的地址,然后发现,即使某软件的TUN模式启动,也没有任何问题,Firefox也会优先使用SmartDNS返回的IPv6结果,但是走某软件路由的域名也可以访问。

我将SmartDNS的配置文件中 bind [::]:53 改为了 bind [::]:56 ,并将 /etc/resolv.conf (软链接) 也改为了 127.0.0.1:56 (此时去除Firefox的DoH设置,使之仍走UDP),发现问题可以复现。查看某软件的 debug 级别日志,发现没有关于相关域名的DNS解析请求;此外阅读了SmartDNS的日志,发现在DNS请求以UDP形式提供时,(相较于未使用某软件时)SmartDNS解析+测速 IPv4+IPv6的总时间变慢了。

目前我无法想明白:为什么将SmartDNS封装为本地DoH可以解决这个问题。

from smartdns.

PikuZheng avatar PikuZheng commented on July 1, 2024

目前我无法想明白:为什么将SmartDNS封装为本地DoH可以解决这个问题。

猜测是走ipv6 dns了 没走smartdns

from smartdns.

Xymmh avatar Xymmh commented on July 1, 2024

校园网?我用了这么长时间,没发现关闭双栈优选后出现不返回AAAA记录的情况。目前只返回ipv6单栈地址风险太大,终端的ipv6连接稳定性很可能没ipv4那么稳,而且浏览器都是默认先走ipv6。

from smartdns.

1000oaks avatar 1000oaks commented on July 1, 2024

校园网?我用了这么长时间,没发现关闭双栈优选后出现不返回AAAA记录的情况。目前只返回ipv6单栈地址风险太大,终端的ipv6连接稳定性很可能没ipv4那么稳,而且浏览器都是默认先走ipv6。

“不返回AAAA记录“是我的错误,关闭双栈优选后确实Firefox对于绝大多数域名走IPv6(但仍有极少数域名走IPv4);此外,about:networking#dns 中DNS记录的IPv4和IPv6的出现顺序确实影响了Firefox连接域名使用IPv4还是IPv6;我所处网络环境IPv4和IPv6差异悬殊,和绝大多数国内普通网络环境有别。

from smartdns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.