mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 23:45:13 +08:00
🌴 Sync 2026-04-12 16:05:35
This commit is contained in:
1 parent
d634f7646d
commit
7e4576cfbe
2 files changed
+5
-13
No files matched your search
@@ -1649,8 +1649,7 @@ function gen_config(var)
|
|||||||
protocol = "dokodemo-door",
|
protocol = "dokodemo-door",
|
||||||
tag = "dns-in",
|
tag = "dns-in",
|
||||||
settings = {
|
settings = {
|
||||||
address = remote_dns_udp_server or remote_dns_tcp_server,
|
address = "0.0.0.0",
|
||||||
port = tonumber(remote_dns_udp_port) or tonumber(remote_dns_tcp_port),
|
|
||||||
network = "tcp,udp"
|
network = "tcp,udp"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -1797,15 +1796,10 @@ function gen_config(var)
|
|||||||
table.insert(hostname, line)
|
table.insert(hostname, line)
|
||||||
end
|
end
|
||||||
table.insert(dns.servers, 2, {
|
table.insert(dns.servers, 2, {
|
||||||
tag = "bootstrap",
|
tag = "dns-in-bootstrap",
|
||||||
address = "223.5.5.5",
|
address = "localhost",
|
||||||
queryStrategy = "UseIPv4",
|
|
||||||
domains = hostname
|
domains = hostname
|
||||||
})
|
})
|
||||||
table.insert(routing.rules, idx, {
|
|
||||||
inboundTag = { "bootstrap" },
|
|
||||||
outboundTag = "direct"
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@ LOCK_FILE="/var/lock/ad_download.lock"
|
|||||||
TMP_DIR="/tmp/ad_download"
|
TMP_DIR="/tmp/ad_download"
|
||||||
RULES_PATH="/usr/share/passwall/rules"
|
RULES_PATH="/usr/share/passwall/rules"
|
||||||
|
|
||||||
# ========== 白名单:合并后需要排除的域名 ==========
|
|
||||||
WHITELIST="ip-api.com"
|
|
||||||
|
|
||||||
# ========== 加锁,防止重复运行 ==========
|
# ========== 加锁,防止重复运行 ==========
|
||||||
exec 200>"$LOCK_FILE"
|
exec 200>"$LOCK_FILE"
|
||||||
if ! flock -n 200; then
|
if ! flock -n 200; then
|
||||||
@@ -111,8 +108,9 @@ process_url() {
|
|||||||
[ ! -s "$parsed" ] && rm -f "$parsed"
|
[ ! -s "$parsed" ] && rm -f "$parsed"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ========== 读取所有 ad_url 并发下载 ==========
|
# ========== 读取 UCI 配置 ==========
|
||||||
AD_URLS=$(uci -q get passwall.@global[0].ad_url 2>/dev/null)
|
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
|
if [ -z "$AD_URLS" ]; then
|
||||||
echo "[ERROR] 未找到任何 ad_url 配置"
|
echo "[ERROR] 未找到任何 ad_url 配置"
|
||||||
|
|||||||
Reference in new issue
Block a user