Code Monkey home page Code Monkey logo

Comments (17)

pymumu avatar pymumu commented on July 22, 2024

查询TXT,SRV记录失败,但这两个记录应该不影响域名解析的。

你现在是无法解析域名吗?

from smartdns.

goldzy123 avatar goldzy123 commented on July 22, 2024

好像在科学上网里指定国内DNS为 smartdns (127.0.0.1 或者 路由Ip地址都试了)会导致国内无法上网
正常使用似乎正常。当时看见好多错误没敢开,我再试试。

from smartdns.

goldzy123 avatar goldzy123 commented on July 22, 2024

再反馈个问题,之前koolshare的LEDEX64软路由,用1103版X64没啥问题,今天又在hyperv里虚拟了个18.06的openwrt装1103版没反应。 装1012版立马正常。
1103版用 service smartdns start/restart/reload 都试了,没有任何输出。log已经调成debug,但是目录下也没有生成log,也确定不了原因。

from smartdns.

pymumu avatar pymumu commented on July 22, 2024

1103增加了TLS支持,依赖openssl的运行库,要装一下。

from smartdns.

goldzy123 avatar goldzy123 commented on July 22, 2024

装了openssl-util可以用了,不过装hyperv虚拟机里当dns服务器很慢,首次查询有个固定的60多ms的延迟,两个版本都是这样。用windows的dns benchmark跑出来uncache 平均时间0.6左右。
试了下禁用smartdns,把虚拟机的dns换成阿里/百度dns,还用虚拟机当dns服务器,测试出来平均时间只有0.19左右。
期间尝试过开关lede自带的offloading,dhcp/dns设置也乱调了一会儿,都没效果。

from smartdns.

goldzy123 avatar goldzy123 commented on July 22, 2024

smartdns配置了4个dns服务器,阿里、百度、dnspod、谷歌,redirect和当dnsmasq上级都试了。

from smartdns.

pymumu avatar pymumu commented on July 22, 2024

速度检测是需要时间的,smartdns从上游获取到IP地址后,并不是直接将结果返回个终端设备的。
从上游获取到IP地址后,还有个测速过程,测速使用了ping和tcp测速。

终端的一次查询,smartdns耗时是:

  1. 到上游的查询时间,T1,需要等待所有DNS服务器返回,最长500ms。(并行查询上游)
  2. 测速时间,T2,每个IP地址进行检测,T2,最长500ms。(并行IP检测)
  3. 如果ping不通,会切换tcp检测,T3,最长500ms。(并行IP检测)

所以:
最长情况是,max(T1)+max(T2)+max(T3)。
最短情况是,min(T1) + min(T2)。

所以,smartdns不在域名解析响应速度,而在返回给终端的IP地址连通速度。
如果只关注解析速度,dnsmasq足够。

针对重复查询的dns,smartdns做了cache来提高查询速度。可以适当将min-TTL的值跳大,以增加缓存时间。提高查询速度,减少检测。

from smartdns.

pymumu avatar pymumu commented on July 22, 2024

我家里dig命令查询百度,时延在16ms,设备是华硕的AC-55U

from smartdns.

pymumu avatar pymumu commented on July 22, 2024

更改一下默认端口号,5353其实是mDNS协议的端口号,可以改成6053端口,再试一下。

from smartdns.

supppig avatar supppig commented on July 22, 2024

查询TXT,SRV记录失败,但这两个记录应该不影响域名解析的。

你现在是无法解析域名吗?

建议对于不支持的dns type,直接把请求传递给第一个dns服务器,再把查询结果回传应该就得了。
另外貌似Release 16要用-f启动才能绑定端口,不用-f的话就不能绑定端口了(netstat -tunpl查询不到)?
机器是老毛子hiboy的mipsle,默认报错不能启动,好像是固件的问题,在lede里拉了libc.so和libgcc_s.so.1过来就能启动了。
。。。分割线。。。
更新:-f启动的问题解决了,原来-c参数必须写绝对路径。。。

from smartdns.

goldzy123 avatar goldzy123 commented on July 22, 2024

现在用着没啥问题了,log关了也看不见失败的解析记录了。

from smartdns.

supppig avatar supppig commented on July 22, 2024

现在用着没啥问题了,log关了也看不见失败的解析记录了。

看不见而已,实际上还是不能解析。
你试试
dig baidu.com NS +noall +answer
dig baidu.com TXT +noall +answer
dig baidu.com MX +noall +answer
这些都是不能查的。但是如果后面加上 @114.114.114.114 就能查了。

from smartdns.

pymumu avatar pymumu commented on July 22, 2024

@supppig 你用12.2号的版本看看吧。

from smartdns.

supppig avatar supppig commented on July 22, 2024

@supppig 你用12.2号的版本看看吧。

@pymumu

Release 17版本,即12.2版本,dig baidu.com NS +noall +answer 依旧不能返回信息,超时。

详细信息如下:
`root@vm-ubuntu:~# dig baidu.com NS +noall +answer @192.168.123.1 -p 6053
;; Warning: ID mismatch: expected ID 47739, got 1
;; Warning: ID mismatch: expected ID 47739, got 2
;; Warning: ID mismatch: expected ID 47739, got 3

; <<>> DiG 9.10.3-P4-Ubuntu <<>> baidu.com NS +noall +answer @192.168.123.1 -p 6053
;; global options: +cmd
;; connection timed out; no servers could be reached
`

smartdns的第一个dns为202.96.134.133(广东电信默认DNS,非广东电信不能用。不过用114dns也是类似结果),作为对比,运行以下命令

`root@vm-ubuntu:~# dig baidu.com NS +noall +answer @202.96.134.133

; <<>> DiG 9.10.3-P4-Ubuntu <<>> baidu.com NS +noall +answer @202.96.134.133
;; global options: +cmd
baidu.com. 81471 IN NS ns2.baidu.com.
baidu.com. 81471 IN NS ns7.baidu.com.
baidu.com. 81471 IN NS ns3.baidu.com.
baidu.com. 81471 IN NS dns.baidu.com.
baidu.com. 81471 IN NS ns4.baidu.com.
`

smartdns开log-debug,输出以下信息

[2018-12-04 18:37:42,598][DEBUG][ dns_server.c:1188] unsupport qtype: 2, domain: baidu.com
[2018-12-04 18:37:42,599][ INFO][ dns_server.c:1203] query server baidu.com from 192.168.123.88, qtype = 2
[2018-12-04 18:37:42,599][ INFO][ dns_client.c:1607] send request baidu.com, qtype 2, id 1
[2018-12-04 18:37:42,603][DEBUG][ dns_client.c:844 ] recv udp, from 202.96.134.133
[2018-12-04 18:37:42,603][DEBUG][ dns_client.c:624 ] qdcount = 1, ancount = 5, nscount = 0, nrcount = 4, len = 181, id = 1, tc = 0, rd = 1, ra = 1, rcode = 0
[2018-12-04 18:37:42,603][DEBUG][ dns_client.c:630 ] domain: baidu.com qtype: 2 qclass: 1
[2018-12-04 18:37:42,637][DEBUG][ dns_client.c:844 ] recv udp, from 202.96.128.166
[2018-12-04 18:37:42,637][DEBUG][ dns_client.c:624 ] qdcount = 1, ancount = 5, nscount = 0, nrcount = 4, len = 181, id = 1, tc = 0, rd = 1, ra = 1, rcode = 0
[2018-12-04 18:37:42,637][DEBUG][ dns_client.c:630 ] domain: baidu.com qtype: 2 qclass: 1
[2018-12-04 18:37:47,619][DEBUG][ dns_server.c:1188] unsupport qtype: 2, domain: baidu.com
[2018-12-04 18:37:47,619][ INFO][ dns_server.c:1203] query server baidu.com from 192.168.123.88, qtype = 2
[2018-12-04 18:37:47,619][ INFO][ dns_client.c:1607] send request baidu.com, qtype 2, id 2
[2018-12-04 18:37:47,621][DEBUG][ dns_client.c:844 ] recv udp, from 202.96.128.166
[2018-12-04 18:37:47,621][DEBUG][ dns_client.c:624 ] qdcount = 1, ancount = 5, nscount = 0, nrcount = 4, len = 181, id = 2, tc = 0, rd = 1, ra = 1, rcode = 0
[2018-12-04 18:37:47,621][DEBUG][ dns_client.c:630 ] domain: baidu.com qtype: 2 qclass: 1
[2018-12-04 18:37:47,623][DEBUG][ dns_client.c:844 ] recv udp, from 202.96.134.133
[2018-12-04 18:37:47,623][DEBUG][ dns_client.c:624 ] qdcount = 1, ancount = 5, nscount = 0, nrcount = 4, len = 181, id = 2, tc = 0, rd = 1, ra = 1, rcode = 0
[2018-12-04 18:37:47,623][DEBUG][ dns_client.c:630 ] domain: baidu.com qtype: 2 qclass: 1
[2018-12-04 18:37:52,627][DEBUG][ dns_server.c:1188] unsupport qtype: 2, domain: baidu.com
[2018-12-04 18:37:52,627][ INFO][ dns_server.c:1203] query server baidu.com from 192.168.123.88, qtype = 2
[2018-12-04 18:37:52,627][ INFO][ dns_client.c:1607] send request baidu.com, qtype 2, id 3
[2018-12-04 18:37:52,629][DEBUG][ dns_client.c:844 ] recv udp, from 202.96.128.166
[2018-12-04 18:37:52,629][DEBUG][ dns_client.c:624 ] qdcount = 1, ancount = 5, nscount = 0, nrcount = 4, len = 181, id = 3, tc = 0, rd = 1, ra = 1, rcode = 0
[2018-12-04 18:37:52,629][DEBUG][ dns_client.c:630 ] domain: baidu.com qtype: 2 qclass: 1
[2018-12-04 18:37:52,631][DEBUG][ dns_client.c:844 ] recv udp, from 202.96.134.133
[2018-12-04 18:37:52,632][DEBUG][ dns_client.c:624 ] qdcount = 1, ancount = 5, nscount = 0, nrcount = 4, len = 181, id = 3, tc = 0, rd = 1, ra = 1, rcode = 0
[2018-12-04 18:37:52,632][DEBUG][ dns_client.c:630 ] domain: baidu.com qtype: 2 qclass: 1

from smartdns.

pymumu avatar pymumu commented on July 22, 2024

;; Warning: ID mismatch: expected ID 47739, got 1
这个错误,在12.2日的一个版本有过,
12.2日刷新过几个版本,估计你下载了临时的一个版本。

重新取一下2号的,再试试。

from smartdns.

supppig avatar supppig commented on July 22, 2024

;; Warning: ID mismatch: expected ID 47739, got 1
这个错误,在12.2日的一个版本有过,
12.2日刷新过几个版本,估计你下载了临时的一个版本。

重新取一下2号的,再试试。

@pymumu 刷新版本后,问题解决!非常感谢!!
感谢你的付出,软件非常棒!!

from smartdns.

supppig avatar supppig commented on July 22, 2024

@pymumu 配置文件smartdns.conf的32行 force AAAA query return SO ,后面漏了一个A。
小问题,下个版本改改吧,嘿嘿~~

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.