pymumu / smartdns

A local DNS server to obtain the fastest website IP for the best Internet experience, support DoT, DoH. 一个本地DNS服务器,获取最快的网站IP,获得最佳上网体验,支持DoH,DoT。
https://pymumu.github.io/smartdns/
GNU General Public License v3.0
7.92k stars 1.05k forks source link

domain-rules的group参数问题 #1741

Closed Archeb closed 1 month ago

Archeb commented 1 month ago

需求应用场景 我观察到最近我更新之后我的group设置全部失效了,我本来是用

domain-rules /example.com/ -g china

这种格式去设置分组的,查阅文档之后发现 https://pymumu.github.io/smartdns/configuration/ 里面 domain-rules 指令已经不再有 group 这个参数了,但是 https://pymumu.github.io/smartdns/config/domain-rule/ 这篇文档里面却仍然保留着。这会给用户带来很大的误解。

建议的方案 修改文档

PikuZheng commented 1 month ago

代码仍存在group的处理啊 https://github.com/pymumu/smartdns/blob/07c13827bb523519a638214ed7ad76180f71a40a/src/dns_conf.c#L4897-L4908

Archeb commented 1 month ago

代码仍存在group的处理啊

https://github.com/pymumu/smartdns/blob/07c13827bb523519a638214ed7ad76180f71a40a/src/dns_conf.c#L4897-L4908

😂 我的意思是不管咋样这两页文档里面肯定有一个是多了或者缺了参数的,至少要让他们同步。

另外我之前一直用的 domain-rules /example.com/ -g china 格式,现在版本下全部都变default分组了,具体是为啥我也没去debug代码。

PikuZheng commented 1 month ago

我怀疑你说的是nameserver组。group是给配置文件分组用的。

PikuZheng commented 1 month ago

新版本采用 group-begin 和 group-end 给配置分组。但是配置上还是会兼容旧的写法,domain-rules 的 group应该是好用的

Archeb commented 1 month ago

我怀疑你说的是nameserver组。group是给配置文件分组用的。

我又去认真看了下,确实是我理解有误,我是想给某个域名指定用的nameserver组,应该用nameserver参数,现在没有问题了,感谢。