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

上游DNS不可访问时自动回退(fallback) #1655

Open
kaoet opened this issue Feb 3, 2024 · 5 comments
Open

上游DNS不可访问时自动回退(fallback) #1655

kaoet opened this issue Feb 3, 2024 · 5 comments

Comments

@kaoet
Copy link

kaoet commented Feb 3, 2024

我在SmartDNS配置中配了两组DNS服务器:chinadefault。并让中国区域名查询china组,其他域名查询default

server https://dns.alidns.com/dns-query -group china -exclude-default-group
server https://dns.google/dns-query

nameserver /baidu.com/china
...

如果两组DNS都通,那么上述配置工作正常。但有时default组的所有服务器都不可访问,此时SmartDNS会返回空的结果。

我不希望此时它返回空的结果,而是在发现目标DNS服务器组都不可访问时,回退到其他组查询并返回一个结果。返回一个结果至少能让客户端有一个解析到的地址,而不是让SmartDNS此时完全不可用。

@kaoet kaoet changed the title Upstream server fallback 上游DNS不可访问时自动回退(fallback) Mar 2, 2024
@kaoet
Copy link
Author

kaoet commented Mar 2, 2024

@pymumu 请问可否表达一下对此的观点?发了一个月了。谢谢。

@PikuZheng
Copy link
Contributor

我用mikrotik(主路由器)来处理这个问题的。。。

@pymumu
Copy link
Owner

pymumu commented Mar 2, 2024

意义是什么?

你配置多个上游,不就不会出现无法解析的情况了么?

@kaoet
Copy link
Author

kaoet commented Mar 4, 2024

比如我默认的DNS上游组,都是国外的DNS-over-HTTPS服务器。此时若是到国外的路由坏掉或不通了,那么整个组所有服务器都不可达了。

@ztjal
Copy link

ztjal commented Mar 14, 2024

支持这个需求,其实我早两年也想提的……

dnscrypt-proxy、mosdns、dnsproxy这些常见的都有fallback功能。

真实使用情景:某天发现常上的好些国外网站打不开,检查DNS,整个组全部连不上,最后发现是大规模的不可抗力(又不是第一次,最近上年那月忘了),这个时候有个fallback组就不用烦了,忍多几天就没事了……(懒人不想调整……)

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

4 participants