luci-app-ssr-plus: use dnsmasq options for chinadns-ng

Avoid hacking uci configs.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2022-12-02 22:41:14 +08:00 committed by sbwml
parent e2099bf17c
commit 8f1067a9a8

View File

@ -206,12 +206,11 @@ start_dns() {
ln_start_bin $(first_type chinadns-ng) chinadns-ng -l $china_dns_port -4 china -p 3 -c ${chinadns/:/#} -t 127.0.0.1#$dns_port -N -f -r
uci -q rename "dhcp.@dnsmasq[0].noresolv"="_orig_noresolv"
uci -q rename "dhcp.@dnsmasq[0].server"="_orig_server"
uci -q set "dhcp.@dnsmasq[0].noresolv"="1"
uci -q add_list "dhcp.@dnsmasq[0].server"="127.0.0.1#$china_dns_port"
uci -q set "dhcp.@dnsmasq[0]._unused_ssrp_changed"=1
uci -q commit "dhcp"
cat <<-EOF >> "$TMP_DNSMASQ_PATH/chinadns_fixed_server.conf"
no-poll
no-resolv
server=127.0.0.1#$china_dns_port
EOF
fi
fi
fi