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

尝试将NovaXNS的DOH地址作为上游 但无法解析 #1956

Open
AriaCraft2019 opened this issue Mar 30, 2025 · 18 comments
Open

尝试将NovaXNS的DOH地址作为上游 但无法解析 #1956

AriaCraft2019 opened this issue Mar 30, 2025 · 18 comments

Comments

@AriaCraft2019
Copy link

问题现象
我将我的NovaXNS提供的DOH地址作为smartdns上游 但是nslookup提示nslookup: write to '::1': Connection refused与;; connection timed out; no servers could be reached

运行环境

  1. 固件型号
    iStoreOS 22.03.7 2024122712
    内核 5.10.221

  2. 运营商
    校园网 电信/联通/移动/教育网

  3. smartdns来源以及版本
    来源:Github上ipk包
    版本:Release 46.1

  4. 涉及的配置(注意去除个人相关信息)
    上游DNS配置 如下图
    Image

重现步骤

  1. 上游DNS配置。
    如上图
  2. 访问的域名。
    任意

详细说明:
本人在上游添加了NovaXNS的DOH服务器 其格式为https://IP:端口/用户ID/dns-query (图中UpStream1与2)与BootStrap服务器(图中223.5.5.5与180.184.1.1 并配置了参数-bootstrap-dns) 发现添加进去后无法解析(nslookup提示nslookup: write to '::1': Connection refused与;; connection timed out; no servers could be reached) 为了确认是否为代理问题 本人替换为阿里DOH地址测试(https://dns.alidns.com/dns-query)发现可以正常解析 而后测试了Cloudflare与Google的DOH地址(https://dns.google/dns-query与https://cloudflare-dns.com/dns-query) 发现依旧可以正常解析 最后测试了本人自建的DNS上游(格式为https://域名:43675/dns-query/用户ID)发现可以正常解析。

@PikuZheng
Copy link
Contributor

这个 https://45.249......../dns-query 拿浏览器直接打开是什么?

@AriaCraft2019
Copy link
Author

图如下
Image
现在我是通过smartdns访问主路由 主路由DNS设置为NovaXNS的DOH来使用的 issue图里的UpStream3就是

@PikuZheng
Copy link
Contributor

你的电脑走代理出去了。但主路由自身访问没过代理。检查代理工具的“代理自身”配置

@AriaCraft2019
Copy link
Author

AriaCraft2019 commented Mar 30, 2025

smartdns运行在旁路由上 在openclash中已设置相关IP和域名返回真实的IP地址且直连(如图) 并且也做了将openclash改成直连与关闭openclash情况下的测试 依旧无法解析 提示一样。

Image

Image

且已测试国外DNS上游 google与cloudflare 是可用的

@PikuZheng
Copy link
Contributor

这个NovaXNS不允许直连,必须经过代理

@AriaCraft2019
Copy link
Author

主路由就是以直连方式连接的NovaXNS 是正常的。 NovaXNS的DNS服务器是无需挂代理查询的。

@AriaCraft2019
Copy link
Author

做了另一个测试 直接在旁路由的ssh中用curl指令使用NovaXNS的DOH地址查询是可以正常返回的 但是Smartdns就会查询失败。
Image

@PikuZheng
Copy link
Contributor

做了另一个测试 直接在旁路由的ssh中用curl指令使用NovaXNS的DOH地址查询是可以正常返回的 但是Smartdns就会查询失败。 Image

这个格式不对。用curl的命令应该类似于

 curl -k -H 'accept: application/dns-message' -v 'https://223.5.5.5/dns-query?dns=3EQBAAABAAAAAAAAA3d3dwZ0YW9iYW8DY29tAAABAAE' |hexdump -c

@AriaCraft2019
Copy link
Author

运行结果如下 可以正常解析 且novaxns控制台也能看得到记录 记录的来源IP为国内源IP而非代理IP

Image

@PikuZheng
Copy link
Contributor

{ [5 bytes data]
太短了,这不可能是正确的查询结果

@AriaCraft2019
Copy link
Author

这是同一时间NovaXNS控制台的日志记录 可见其是由curl请求的

Image

@PikuZheng
Copy link
Contributor

www.taobao.com.danuoyi.tbcache.com 这都多少字节了 不可能只有5字节的

@AriaCraft2019
Copy link
Author

AriaCraft2019 commented Mar 31, 2025

不好意思 截图并未截全 这里是输出剩余部分

Image

补充一下 用NovaXNS的TLS作为上游是可用的 唯独DOH不行

@PikuZheng
Copy link
Contributor

PikuZheng commented Apr 1, 2025

这个服务器的https应答有 Transfer-Encoding: chunked 标记,smartdns 似乎认为长度为0而拒绝解析 @pymumu

另外这个服务器返回的查询id总是0000

Image

Image

@pymumu
Copy link
Owner

pymumu commented Apr 1, 2025

改了chunked,但没法验证,你们可以验证看看。
另外,看issue里面写的错误,可能是没有开启ipv6的服务端,可以开启ipv6服务端看看。
不行就发一下log看看吧。

@PikuZheng
Copy link
Contributor

PikuZheng commented Apr 1, 2025

我这里可以了

Image

@AriaCraft2019
Copy link
Author

AriaCraft2019 commented Apr 2, 2025

尝试打开了IPV6服务器 依旧无法正常解析 前面已说 Google与CloudFlare的DOH都是可以正常解析的 NovaXNS的TLS也可以正常解析 唯独NovaXNS的DOH地址无法解析

更正:似乎可以正常解析 网页打开正常 只是无法nslookup 我再测试一下

@PikuZheng
Copy link
Contributor

尝试打开了IPV6服务器 依旧无法正常解析 前面已说 Google与CloudFlare的DOH都是可以正常解析的 NovaXNS的TLS也可以正常解析 唯独NovaXNS的DOH地址无法解析

更正:似乎可以正常解析 网页打开正常 只是无法nslookup 我再测试一下

要用最新的代码编译后使用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants