mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-07-27 10:31:38 +08:00
🌴 Sync 2026-04-12 16:05:35
This commit is contained in:
parent
d634f7646d
commit
7e4576cfbe
@ -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
|
||||
|
||||
|
||||
@ -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 配置"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user