luci-app-passwall2: sync upstream

last commit: e7963d6755
This commit is contained in:
gitea-action 2024-12-21 16:00:19 +08:00
parent 8578e36522
commit 0c4485a29d
2 changed files with 4 additions and 6 deletions

View File

@ -794,7 +794,7 @@ run_global() {
-DEFAULT_DNS ${AUTO_DNS} -LOCAL_DNS ${LOCAL_DNS:-${AUTO_DNS}} -TUN_DNS ${TUN_DNS} \
-NFTFLAG ${nftflag:-0} \
-NO_LOGIC_LOG ${NO_LOGIC_LOG:-0}
/etc/init.d/dnsmasq restart >/dev/null 2>&1
lua $APP_PATH/helper_dnsmasq.lua logic_restart -LOG 1
else
#Run a copy dnsmasq instance, DNS hijack for that need proxy devices.
GLOBAL_DNSMASQ_PORT=$(get_new_port 11400)
@ -1256,7 +1256,7 @@ start() {
uci -q commit ${CONFIG}
uci -q set dhcp.@dnsmasq[0].dns_redirect='0'
uci -q commit dhcp
/etc/init.d/dnsmasq restart >/dev/null 2>&1
lua $APP_PATH/helper_dnsmasq.lua restart -LOG 0
}
fi
[ "$ENABLED_DEFAULT_ACL" == 1 ] && run_global

View File

@ -102,10 +102,8 @@ function logic_restart(var)
tinsert(dns_table, v)
end
end
if dns_table and #dns_table > 0 then
uci:set_list("dhcp", "@dnsmasq[0]", "server", dns_table)
uci:commit("dhcp")
end
uci:set_list("dhcp", "@dnsmasq[0]", "server", dns_table)
uci:commit("dhcp")
end
sys.call("/etc/init.d/dnsmasq restart >/dev/null 2>&1")
restore_servers()