From 7e4576cfbe9e1baff80a94ff59fb4e5d34a5b63a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 12 Apr 2026 16:05:35 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=B4=20Sync=202026-04-12=2016:05:35?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luci-app-passwall/luasrc/passwall/util_xray.lua | 12 +++--------- luci-app-passwall/root/usr/share/passwall/adblock.sh | 6 ++---- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/luci-app-passwall/luasrc/passwall/util_xray.lua b/luci-app-passwall/luasrc/passwall/util_xray.lua index e96ccd19..92cdb494 100644 --- a/luci-app-passwall/luasrc/passwall/util_xray.lua +++ b/luci-app-passwall/luasrc/passwall/util_xray.lua @@ -1649,8 +1649,7 @@ function gen_config(var) protocol = "dokodemo-door", tag = "dns-in", settings = { - address = remote_dns_udp_server or remote_dns_tcp_server, - port = tonumber(remote_dns_udp_port) or tonumber(remote_dns_tcp_port), + address = "0.0.0.0", network = "tcp,udp" } }) @@ -1797,15 +1796,10 @@ function gen_config(var) table.insert(hostname, line) end table.insert(dns.servers, 2, { - tag = "bootstrap", - address = "223.5.5.5", - queryStrategy = "UseIPv4", + tag = "dns-in-bootstrap", + address = "localhost", domains = hostname }) - table.insert(routing.rules, idx, { - inboundTag = { "bootstrap" }, - outboundTag = "direct" - }) end end diff --git a/luci-app-passwall/root/usr/share/passwall/adblock.sh b/luci-app-passwall/root/usr/share/passwall/adblock.sh index bda49e0b..97630379 100755 --- a/luci-app-passwall/root/usr/share/passwall/adblock.sh +++ b/luci-app-passwall/root/usr/share/passwall/adblock.sh @@ -5,9 +5,6 @@ LOCK_FILE="/var/lock/ad_download.lock" TMP_DIR="/tmp/ad_download" RULES_PATH="/usr/share/passwall/rules" -# ========== 白名单:合并后需要排除的域名 ========== -WHITELIST="ip-api.com" - # ========== 加锁,防止重复运行 ========== exec 200>"$LOCK_FILE" if ! flock -n 200; then @@ -111,8 +108,9 @@ process_url() { [ ! -s "$parsed" ] && rm -f "$parsed" } -# ========== 读取所有 ad_url 并发下载 ========== +# ========== 读取 UCI 配置 ========== AD_URLS=$(uci -q get passwall.@global[0].ad_url 2>/dev/null) +WHITELIST="$(uci -q get passwall.@global[0].white_list 2>/dev/null) ip-api.com" if [ -z "$AD_URLS" ]; then echo "[ERROR] 未找到任何 ad_url 配置"