mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-03 05:53:56 +08:00
🐤 Sync 2026-09-08 23:54:39
This commit is contained in:
1 parent
4df4ad7d50
commit
6d2e39ca12
18 files changed
+68
-49
No files matched your search
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=26.9.1
|
||||
PKG_RELEASE:=260
|
||||
PKG_RELEASE:=261
|
||||
PKG_PO_VERSION:=$(PKG_VERSION)
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
@@ -174,9 +174,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
|
||||
|
||||
|
||||
@@ -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",
|
||||
@@ -2032,13 +2032,13 @@ function gen_config(var)
|
||||
local direct_outbound = {
|
||||
protocol = "freedom",
|
||||
tag = "direct",
|
||||
settings = {
|
||||
domainStrategy = (direct_dns_query_strategy and direct_dns_query_strategy ~= "") and direct_dns_query_strategy or "UseIP",
|
||||
finalRules = (api.compare_versions(xray_version, ">", "26.4.25")) and {{ action = "allow" }} or nil -- Todo: Remove version check
|
||||
},
|
||||
settings = (api.compare_versions(xray_version, ">", "26.4.25")) and { -- Todo: Remove version check
|
||||
finalRules = {{ action = "allow" }}
|
||||
} or nil,
|
||||
streamSettings = {
|
||||
sockopt = {
|
||||
mark = 255
|
||||
mark = 255,
|
||||
domainStrategy = (direct_dns_query_strategy and direct_dns_query_strategy ~= "") and direct_dns_query_strategy or "UseIP"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user