Coder Social home page Coder Social logo

Comments (4)

PikuZheng avatar PikuZheng commented on August 28, 2024 1

对于smartdns,一个域名查询出cname后,其cname递归查询时也是遵循主域名规则的。这里没有问题。

你说的情况发生在smartdns下级不是终端用户而是另一个dns服务器的情形。根据rfc规范,dns服务器会发起两次查询。第一次查询A记录。若上游返回CNAME和A记录,第二次应使用CNAME再次查询AAAA记录。
但终端用户查询时会查询A+AAAA记录,便不会出现第二次使用CNAME查询的情形。

对于上述问题有几个解决方案。一是将CNAME对应的域名也写入域名规则。二是smartdns直接对终端用户使用,中间不要有其他dns服务器做转发。三是配置 force-no-CNAME yes 使smartdns在应答时不返回cname(这不符合规范,参考#1648

from smartdns.

zonyitoo avatar zonyitoo commented on August 28, 2024

force-no-CNAME yes 应该是比较好的选择

  1. 如果不直接连 dnsmasq ,那么 .lan 域名的解析就有问题,目前对这些域名有依赖
  2. 把 CNAME 对应的域名写入规则,发现问题之后确实是这样做,但不可靠,写不完
  3. dnsmasq 设置为无缓存,相当于直接透传,应该问题不大

from smartdns.

PikuZheng avatar PikuZheng commented on August 28, 2024
  1. 如果不直接连 dnsmasq ,那么 .lan 域名的解析就有问题,目前对这些域名有依赖

配个上游组单独给.lan

我自己是用第二种方法,感觉也就是那几组分布式加速服务器,fastly,akamai之类的

from smartdns.

zonyitoo avatar zonyitoo commented on August 28, 2024

实际上在OpenWRT的使用场景,dnsmasq -> smartdns 可以视为一个整体,不往上传递 CNAME ,对应用来讲没有问题。一个个加白不够一劳永逸,把fastly整个都加了又太过暴力

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.