mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-01 14:03:56 +08:00
update 2026-09-08 16:30:31
This commit is contained in:
1 parent
f12aa6537d
commit
b81fb0f1c5
5 files changed
+31
-16
No files matched your search
+4
-4
@@ -1,8 +1,8 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=clashoo
|
PKG_NAME:=clashoo
|
||||||
PKG_SHORT_SHA:=8f54283
|
PKG_SHORT_SHA:=a91201f
|
||||||
PKG_COMMIT_DATE:=2026.09.07
|
PKG_COMMIT_DATE:=2026.09.08
|
||||||
|
|
||||||
PKG_VERSION:=$(PKG_COMMIT_DATE)~$(PKG_SHORT_SHA)
|
PKG_VERSION:=$(PKG_COMMIT_DATE)~$(PKG_SHORT_SHA)
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
@@ -11,8 +11,8 @@ PKG_SOURCE:=$(PKG_NAME)-alpha-$(PKG_SHORT_SHA).tar.gz
|
|||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-alpha-$(PKG_SHORT_SHA)
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-alpha-$(PKG_SHORT_SHA)
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-alpha-$(PKG_SHORT_SHA)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-alpha-$(PKG_SHORT_SHA)
|
||||||
PKG_SOURCE_URL:=https://github.com/kenzok8/openwrt-clashoo/releases/download/mihomo-src
|
PKG_SOURCE_URL:=https://github.com/kenzok8/openwrt-clashoo/releases/download/mihomo-src
|
||||||
PKG_SOURCE_VERSION:=8f54283e97728859d88f45025bab250504337687
|
PKG_SOURCE_VERSION:=a91201f1fc1eb9576f284a4655d819326662fb61
|
||||||
PKG_HASH:=28db96ba63d8f4e79df122c1efe02fed485e1997cf1888e5d045c17908aa34a9
|
PKG_HASH:=ca9c09031531332890ceadab7748ad33a24e391eac1b8a6de929c38151eeca7e
|
||||||
PKG_BUILD_VERSION:=alpha-$(PKG_SHORT_SHA)
|
PKG_BUILD_VERSION:=alpha-$(PKG_SHORT_SHA)
|
||||||
|
|
||||||
PKG_LICENSE:=GPL3.0+
|
PKG_LICENSE:=GPL3.0+
|
||||||
|
|||||||
@@ -164,9 +164,17 @@ define Package/$(PKG_NAME)/conffiles
|
|||||||
/usr/share/passwall/rules/domains_excluded
|
/usr/share/passwall/rules/domains_excluded
|
||||||
endef
|
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
|
define Package/$(PKG_NAME)/postrm
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
rm -f $${IPKG_INSTROOT}/usr/share/passwall/rules/*.nft
|
rm -f $${IPKG_INSTROOT}/usr/share/passwall/rules/*.nft
|
||||||
|
rm -rf $${IPKG_INSTROOT}/tmp/etc/passwall_tmp
|
||||||
exit 0
|
exit 0
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|||||||
@@ -1378,11 +1378,22 @@ function to_move(app_name,file)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function get_version()
|
function get_version()
|
||||||
local version = sys.exec("opkg list-installed luci-app-passwall 2>/dev/null | awk '{print $3}'")
|
local version
|
||||||
if not version or #version == 0 then
|
local version_file = CACHE_PATH .. "/passwall_version"
|
||||||
version = sys.exec("apk list luci-app-passwall 2>/dev/null | awk '/installed/ {print $1}' | cut -d'-' -f4-")
|
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
|
end
|
||||||
return (version or ""):gsub("\n", ""):match("^([^-]+)")
|
return version:match("^([^-]+)") or ""
|
||||||
end
|
end
|
||||||
|
|
||||||
function to_check_self()
|
function to_check_self()
|
||||||
|
|||||||
@@ -2216,14 +2216,10 @@ function gen_config(var)
|
|||||||
})
|
})
|
||||||
else
|
else
|
||||||
table.insert(dns.rules, 1, {
|
table.insert(dns.rules, 1, {
|
||||||
action = "evaluate",
|
preferred_by = "hosts",
|
||||||
|
action = "route",
|
||||||
server = "hosts"
|
server = "hosts"
|
||||||
})
|
})
|
||||||
table.insert(dns.rules, 2, {
|
|
||||||
match_response = true,
|
|
||||||
ip_accept_any = true,
|
|
||||||
action = "respond"
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if COMMON.default_outbound_tag == "block" then
|
if COMMON.default_outbound_tag == "block" then
|
||||||
|
|||||||
@@ -1800,8 +1800,8 @@ function gen_config(var)
|
|||||||
remote_dns_outbound = {
|
remote_dns_outbound = {
|
||||||
tag = "dns-out",
|
tag = "dns-out",
|
||||||
protocol = "dns",
|
protocol = "dns",
|
||||||
proxySettings = dns_outbound_tag and {
|
streamSettings = dns_outbound_tag and {
|
||||||
tag = (dns_outbound_tag ~= "blackhole") and dns_outbound_tag or "direct"
|
sockopt = { dialerProxy = (dns_outbound_tag ~= "blackhole") and dns_outbound_tag or "direct" }
|
||||||
} or nil,
|
} or nil,
|
||||||
settings = {
|
settings = {
|
||||||
address = (chn_list ~= "proxy") and "8.8.8.8" or "223.5.5.5",
|
address = (chn_list ~= "proxy") and "8.8.8.8" or "223.5.5.5",
|
||||||
|
|||||||
Reference in new issue
Block a user