vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
16.75k stars 3.09k forks source link

使用内网DNS服务器作为上游时DNS请求超时 #2242

Closed FrostleafChan closed 2 years ago

FrostleafChan commented 2 years ago

openclash设置域名形式的DoH、DoT时也会报错(IP形式的就没事),我用DNSProxy进行请求,Clash上游设置为DNSProxy。刚开始用的时候还好,第二次应用配置时报错。 内核日志:

2022-04-08 22:10:01 level=debug msg="[DNS Server] Exchange ;www.baidu.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:51319->192.168.233.1:23353: i/o timeout"
2022-04-08 22:10:01 level=debug msg="[DNS Server] Exchange ;clients4.google.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:54138->192.168.233.1:23353: i/o timeout"
2022-04-08 22:10:01 level=debug msg="[DNS Server] Exchange ;clients4.google.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:54138->192.168.233.1:23353: i/o timeout"
2022-04-08 22:10:01 level=debug msg="[DNS Server] Exchange ;d.skk.moe.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:10:01 level=debug msg="[DNS Server] Exchange ;whois.pconline.com.cn.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:38410->192.168.233.1:23353: i/o timeout"
2022-04-08 22:10:01 level=debug msg="[DNS Server] Exchange ;d.skk.moe.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:10:01 level=debug msg="[DNS Server] Exchange ;whois.pconline.com.cn.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:38410->192.168.233.1:23353: i/o timeout"
2022-04-08 22:10:01 level=debug msg="[DNS Server] Exchange ;www.taobao.com.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:10:01 level=debug msg="[DNS Server] Exchange ;www.taobao.com.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:10:01 level=debug msg="[DNS Server] Exchange ;mirrors.tuna.tsinghua.edu.cn.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:10:01 level=debug msg="[DNS Server] Exchange ;mirrors.tuna.tsinghua.edu.cn.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:09:58 level=debug msg="[DNS Server] Exchange ;cdn.jsdelivr.net.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:60369->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:58 level=debug msg="[DNS Server] Exchange ;cdn.jsdelivr.net.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:60369->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:58 level=debug msg="[DNS Server] Exchange ;dataflow.biliapi.com.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:09:58 level=debug msg="[DNS Server] Exchange ;dataflow.biliapi.com.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:09:56 level=debug msg="[DNS Server] Exchange ;otheve.beacon.qq.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:33654->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:56 level=debug msg="[DNS Server] Exchange ;otheve.beacon.qq.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:33654->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:56 level=debug msg="[DNS Server] Exchange ;otheve.beacon.qq.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:33654->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:56 level=debug msg="[DNS Server] Exchange ;otheve.beacon.qq.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:33654->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:56 level=debug msg="[DNS Server] Exchange ;mirrors.tuna.tsinghua.edu.cn.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:09:56 level=debug msg="[DNS Server] Exchange ;mirrors.tuna.tsinghua.edu.cn.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:09:56 level=debug msg="[DNS Server] Exchange ;mirrors.tuna.tsinghua.edu.cn.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:09:53 level=debug msg="[DNS Server] Exchange ;cdn.jsdelivr.net.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:45162->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:53 level=debug msg="[DNS Server] Exchange ;h.trace.qq.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:55707->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:53 level=debug msg="[DNS Server] Exchange ;h.trace.qq.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:55707->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:52 level=warning msg="[TCP] dial 🐟 漏网之鱼 (match Match/) to 192.169.122.231:443 error: hk01-vm5.entry.ikuuu.casa:450 connect error: all DNS requests failed, first error: read udp4 222.***.**.***:47626->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:51 level=debug msg="[DNS Server] Exchange ;otheve.beacon.qq.com.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:09:51 level=debug msg="[DNS Server] Exchange ;otheve.beacon.qq.com.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:09:51 level=debug msg="[DNS Server] Exchange ;mirrors.tuna.tsinghua.edu.cn.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:47617->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:51 level=debug msg="[DNS Server] Exchange ;mirrors.tuna.tsinghua.edu.cn.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:47617->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:50 level=debug msg="[DNS Server] Exchange ;dataflow.biliapi.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:52868->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:50 level=debug msg="[DNS Server] Exchange ;dataflow.biliapi.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:52868->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:48 level=debug msg="[DNS Server] Exchange ;cdn.jsdelivr.net.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:57996->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:48 level=debug msg="[DNS Server] Exchange ;cdn.jsdelivr.net.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:57996->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:47 level=info msg="[TCP] 192.168.233.204:59940 --> 47.246.38.230:443 match IPCIDR(47.246.0.0/16) using 🇨🇳 国内网站[DIRECT]"
2022-04-08 22:09:47 level=info msg="[TCP] 192.168.233.204:45520 --> 47.246.38.228:443 match IPCIDR(47.246.0.0/16) using 🇨🇳 国内网站[DIRECT]"
2022-04-08 22:09:47 level=debug msg="[DNS Server] Exchange ;clients2.google.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:57269->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:47 level=debug msg="[DNS Server] Exchange ;clients2.google.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:57269->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:47 level=debug msg="[DNS Server] Exchange ;clients2.google.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:57269->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:47 level=debug msg="[DNS Server] Exchange ;clients2.google.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:57269->192.168.233.1:23353: i/o timeout"
2022-04-08 22:09:45 level=debug msg="[DNS Server] Exchange ;mirrors.tuna.tsinghua.edu.cn.\tIN\t A failed: all DNS requests failed, first error: context deadline exceeded"
2022-04-08 22:09:45 level=debug msg="[DNS Server] Exchange ;otheve.beacon.qq.com.\tIN\t A failed: all DNS requests failed, first error: read udp4 222.***.**.***:39169->192.168.233.1:23353: i/o timeout"

注:222.*.*.是我的WAN口v4地址。 OpenWrt未安装ipv6支持。 绑定网络接口到pppoe-wan过,不行;停用也还是报错。

vernesong commented 2 years ago

一台机器?

FrostleafChan commented 2 years ago

? 就是自己家一台路由器啊.jpg Clash的上游DNS只有一个内网DNS,内网DNS有多个DoH、DoT上游。 内网DNS在关闭Clash以及Clash不报错时均正常解析,但Clash开始报错之后内网DNS也跟着超时,但直连其它ip正常。

vernesong commented 2 years ago

nameserver要加几个IP的DNS,或者default-nameserver自己手动加几个IP的DNS

FrostleafChan commented 2 years ago

但是我想让所有的DNS请求都走那些DoH和DoT。 加了ip的dns之后会有一部分请求走ip吧?

vernesong commented 2 years ago

default-nameserver

FrostleafChan commented 2 years ago

好的,谢谢

Alex-syz commented 2 years ago

请问大佬一下,default-nameserver在哪边添加,我现在的规则里面看不到default-nameserver,然后DoH的dns只有几个固定的能解析,连8.8.8.8都用不了

zhfg commented 2 years ago

我也遇到这了样的问题,并且我解决了。 解决方案是配置【全局设置】-【绑定网卡】选择pppoe接口,在我这里是“pppoe-wan6"

其它按官方教程

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days