update 2026-09-08 16:30:31

This commit is contained in:
action committed 2026-09-08 16:30:31 +08:00
1 parent f12aa6537d
commit b81fb0f1c5
5 files changed
+31 -16

No files matched your search

+8
View File
@@ -164,9 +164,17 @@ define Package/$(PKG_NAME)/conffiles
/usr/share/passwall/rules/domains_excluded
endef
define Package/$(PKG_NAME)/postinst
#!/bin/sh
rm -f $${IPKG_INSTROOT}/usr/share/passwall/rules/*.nft
rm -rf $${IPKG_INSTROOT}/tmp/etc/passwall_tmp
exit 0
endef
define Package/$(PKG_NAME)/postrm
#!/bin/sh
rm -f $${IPKG_INSTROOT}/usr/share/passwall/rules/*.nft
rm -rf $${IPKG_INSTROOT}/tmp/etc/passwall_tmp
exit 0
endef
+15 -4
View File
@@ -1378,11 +1378,22 @@ function to_move(app_name,file)
end
function get_version()
local version = sys.exec("opkg list-installed luci-app-passwall 2>/dev/null | awk '{print $3}'")
if not version or #version == 0 then
version = sys.exec("apk list luci-app-passwall 2>/dev/null | awk '/installed/ {print $1}' | cut -d'-' -f4-")
local version
local version_file = CACHE_PATH .. "/passwall_version"
sys.call("mkdir -p " .. CACHE_PATH)
if fs.access(version_file) then
version = fs.readfile(version_file)
else
version = sys.exec("opkg list-installed luci-app-passwall 2>/dev/null | awk '{print $3}'")
if not version or version == "" then
version = sys.exec("apk list luci-app-passwall 2>/dev/null | awk '/installed/ {print $1}' | cut -d'-' -f4-")
end
version = (version or ""):match("^%s*(.-)%s*$")
if version ~= "" then
fs.writefile(version_file, version)
end
end
return (version or ""):gsub("\n", ""):match("^([^-]+)")
return version:match("^([^-]+)") or ""
end
function to_check_self()
@@ -2216,14 +2216,10 @@ function gen_config(var)
})
else
table.insert(dns.rules, 1, {
action = "evaluate",
preferred_by = "hosts",
action = "route",
server = "hosts"
})
table.insert(dns.rules, 2, {
match_response = true,
ip_accept_any = true,
action = "respond"
})
end
if COMMON.default_outbound_tag == "block" then
@@ -1800,8 +1800,8 @@ function gen_config(var)
remote_dns_outbound = {
tag = "dns-out",
protocol = "dns",
proxySettings = dns_outbound_tag and {
tag = (dns_outbound_tag ~= "blackhole") and dns_outbound_tag or "direct"
streamSettings = dns_outbound_tag and {
sockopt = { dialerProxy = (dns_outbound_tag ~= "blackhole") and dns_outbound_tag or "direct" }
} or nil,
settings = {
address = (chn_list ~= "proxy") and "8.8.8.8" or "223.5.5.5",