From 8578e365228f96ce884069c92d2b7fb4461ad4e9 Mon Sep 17 00:00:00 2001 From: gitea-action Date: Sat, 21 Dec 2024 15:30:16 +0800 Subject: [PATCH] luci-app-passwall: sync upstream last commit: https://github.com/xiaorouji/openwrt-passwall/commit/44689ec35f6aa4bb5fffa37a1a9cc3b422726426 --- luci-app-passwall/root/usr/share/passwall/app.sh | 3 +-- .../root/usr/share/passwall/helper_dnsmasq.lua | 6 ++---- patch-luci-app-passwall.patch | 6 +++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/luci-app-passwall/root/usr/share/passwall/app.sh b/luci-app-passwall/root/usr/share/passwall/app.sh index 14aa4e445..fb3f64db4 100755 --- a/luci-app-passwall/root/usr/share/passwall/app.sh +++ b/luci-app-passwall/root/usr/share/passwall/app.sh @@ -1610,7 +1610,7 @@ start_dns() { -USE_DIRECT_LIST "${USE_DIRECT_LIST}" -USE_PROXY_LIST "${USE_PROXY_LIST}" -USE_BLOCK_LIST "${USE_BLOCK_LIST}" -USE_GFW_LIST "${USE_GFW_LIST}" -CHN_LIST "${CHN_LIST}" \ -TCP_NODE ${TCP_NODE} -DEFAULT_PROXY_MODE ${TCP_PROXY_MODE} -NO_PROXY_IPV6 ${DNSMASQ_FILTER_PROXY_IPV6:-0} -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) @@ -2015,7 +2015,6 @@ start() { } [ -n "$USE_TABLES" ] && source $APP_PATH/${USE_TABLES}.sh start set_cache_var "USE_TABLES" "$USE_TABLES" - [ -z "$(get_cache_var "ACL_default_dns_port")" ] && lua $APP_PATH/helper_dnsmasq.lua logic_restart -LOG 1 if [ "$ENABLED_DEFAULT_ACL" == 1 ] || [ "$ENABLED_ACLS" == 1 ]; then bridge_nf_ipt=$(sysctl -e -n net.bridge.bridge-nf-call-iptables) set_cache_var "bak_bridge_nf_ipt" "$bridge_nf_ipt" diff --git a/luci-app-passwall/root/usr/share/passwall/helper_dnsmasq.lua b/luci-app-passwall/root/usr/share/passwall/helper_dnsmasq.lua index 18d01d14b..143d331c0 100644 --- a/luci-app-passwall/root/usr/share/passwall/helper_dnsmasq.lua +++ b/luci-app-passwall/root/usr/share/passwall/helper_dnsmasq.lua @@ -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() diff --git a/patch-luci-app-passwall.patch b/patch-luci-app-passwall.patch index ba95b5c53..997b953dc 100644 --- a/patch-luci-app-passwall.patch +++ b/patch-luci-app-passwall.patch @@ -175,7 +175,7 @@ index 551c824..2a6a814 100644 config global_forwarding option tcp_no_redir_ports 'disable' diff --git a/luci-app-passwall/root/usr/share/passwall/app.sh b/luci-app-passwall/root/usr/share/passwall/app.sh -index 57f52f0..14aa4e4 100755 +index f5d7466..fb3f64d 100755 --- a/luci-app-passwall/root/usr/share/passwall/app.sh +++ b/luci-app-passwall/root/usr/share/passwall/app.sh @@ -1589,9 +1589,7 @@ start_dns() { @@ -237,7 +237,7 @@ index 57f52f0..14aa4e4 100755 /etc/init.d/dnsmasq restart >/dev/null 2>&1 } fi -@@ -2047,23 +2045,11 @@ stop() { +@@ -2046,23 +2044,11 @@ stop() { source $APP_PATH/helper_smartdns.sh del rm -rf $GLOBAL_DNSMASQ_CONF rm -rf $GLOBAL_DNSMASQ_CONF_PATH @@ -266,7 +266,7 @@ index 57f52f0..14aa4e4 100755 rm -rf $TMP_PATH rm -rf /tmp/lock/${CONFIG}_socks_auto_switch* echolog "清空并关闭相关程序和缓存完成。" -@@ -2122,7 +2108,6 @@ DNS_CACHE=0 +@@ -2121,7 +2107,6 @@ DNS_CACHE=0 REMOTE_DNS=$(config_t_get global remote_dns 1.1.1.1:53 | sed 's/#/:/g' | sed -E 's/\:([^:]+)$/#\1/g') USE_DEFAULT_DNS=$(config_t_get global use_default_dns direct) FILTER_PROXY_IPV6=$(config_t_get global filter_proxy_ipv6 0)