Skip to content

处理用户设置的 dnsmasq DNS 服务器 #234

@MkQtS

Description

@MkQtS

Feature description

homeproxy 需要通过 dnsmasq 指定 chiandns-ng 作为 DNS 服务器,而用户也可以通过 uci/luci 设置 dhcp.@dnsmasq[0].server,后者会影响前者运行

例如通过 luci 设置了被污染的国内 DNS,homeproxy 为国内白名单模式,此时谷歌域名无法被正确解析(我今天遇到的),欠缺相关知识的用户可能无法找到问题原因

建议在 homeproxy 启动时禁用用户设置的 dhcp.@dnsmasq[0].server(可以先改个 uci 键值备份起来,在停止 homeproxy 时恢复?)

Expected behavior

No response

Additional information

dhcp.@dnsmasq[0].server 中指定的 DNS 服务器是被写进了 /var/etc/dnsmasq.conf.cfg01411c/tmp/dnsmasq.cfg01411c.d/dnsmasq-homeproxy.d/redirect-dns.conf 中的 no-resolv 对它不管用

# https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
-R, --no-resolv
Don't read /etc/resolv.conf. Get upstream servers only from the command line or the dnsmasq configuration file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions