luci-app-ssr-plus: Add "use system settings" for AdGuardHome

This commit is contained in:
CN_SZTL 2019-07-06 23:30:56 +08:00
parent 350f06cfea
commit 3d5835c332
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
3 changed files with 14 additions and 10 deletions

View File

@ -62,6 +62,7 @@ o.default = gfw
o = s:option(ListValue, "pdnsd_enable", translate("Resolve Dns Mode"))
o:value("1", translate("Use Pdnsd tcp query and cache"))
o:value("0", translate("Use Local DNS Service listen port 5335"))
o:value("2", translate("Use system settings"))
o.default = 1
o = s:option(ListValue, "tunnel_forward", translate("Anti-pollution DNS Server"))

View File

@ -473,6 +473,9 @@ msgstr "服务器节点"
msgid "Use Local DNS Service listen port 5335"
msgstr "使用本机端口为5335的DNS服务"
msgid "Use system settings"
msgstr "跟随系统设置"
msgid "Server Node Type"
msgstr "服务器节点类型"

View File

@ -475,20 +475,20 @@ start() {
switch_enable=1
fi
if rules ;then
start_redir
mkdir -p /tmp/dnsmasq.d
if ! [ "$run_mode" = "oversea" ] ;then
cat > /tmp/dnsmasq.d/dnsmasq-ssr.conf <<EOF
start_redir
if ! [ "$(uci_get_by_type global pdnsd_enable)" = "2" ] ;then
mkdir -p /tmp/dnsmasq.d
if ! [ "$run_mode" = "oversea" ] ;then
cat > /tmp/dnsmasq.d/dnsmasq-ssr.conf <<EOF
conf-dir=/etc/dnsmasq.ssr
EOF
else
cat > /tmp/dnsmasq.d/dnsmasq-ssr.conf <<EOF
else
cat > /tmp/dnsmasq.d/dnsmasq-ssr.conf <<EOF
conf-dir=/etc/dnsmasq.oversea
EOF
fi
/etc/init.d/dnsmasq restart >/dev/null 2>&1
fi
/etc/init.d/dnsmasq restart >/dev/null 2>&1
fi
fi
start_server
start_local