update 2025-12-04 00:34:15

This commit is contained in:
kenzok8
2025-12-04 00:34:15 +08:00
parent 3629f5fd90
commit 336563d553
4 changed files with 23 additions and 10 deletions

View File

@@ -11,7 +11,7 @@ LUCI_DEPENDS:=+curl +opkg +luci-base +tar +libuci-lua +mount-utils +luci-lib-tas
LUCI_EXTRA_DEPENDS:=luci-lib-taskd (>=1.0.19) LUCI_EXTRA_DEPENDS:=luci-lib-taskd (>=1.0.19)
LUCI_PKGARCH:=all LUCI_PKGARCH:=all
PKG_VERSION:=0.1.30-1 PKG_VERSION:=0.1.31-1
# PKG_RELEASE MUST be empty for luci.mk # PKG_RELEASE MUST be empty for luci.mk
PKG_RELEASE:= PKG_RELEASE:=

View File

@@ -264,6 +264,7 @@ local function get_installed_and_cache()
if not ms then if not ms then
result = {} result = {}
elseif not cs or ms["mtime"] > cs["mtime"] then elseif not cs or ms["mtime"] > cs["mtime"] then
local cacheable = true
local itr = fs.dir(metadir) local itr = fs.dir(metadir)
local data = {} local data = {}
if itr then if itr then
@@ -287,10 +288,20 @@ local function get_installed_and_cache()
broken = true, broken = true,
} }
end end
local time = nil
local metapkg = metapkgpre .. meta.name local metapkg = metapkgpre .. meta.name
local status = ipkg.status(metapkg) local status = ipkg.status(metapkg)
if next(status) ~= nil then if next(status) ~= nil then
meta.time = tonumber(status[metapkg]["Installed-Time"]) time = status[metapkg]["Installed-Time"]
else
local istat = fs.stat("/usr/lib/opkg/info/" .. metapkg .. ".list")
if istat ~= nil then
time = istat["mtime"]
end
cacheable = false
end
if time ~= nil then
meta.time = tonumber(time)
data[#data+1] = meta data[#data+1] = meta
end end
end end
@@ -298,11 +309,13 @@ local function get_installed_and_cache()
end end
end end
result = data result = data
fs.mkdirr(cachedir) if cacheable then
local oflags = nixio.open_flags("rdwr", "creat") fs.mkdirr(cachedir)
local mfile, code, msg = nixio.open(cachefile, oflags) local oflags = nixio.open_flags("rdwr", "creat")
mfile:writeall(jsonc.stringify(result)) local mfile, code, msg = nixio.open(cachefile, oflags)
mfile:close() mfile:writeall(jsonc.stringify(result))
mfile:close()
end
else else
result = jsonc.parse(fs.readfile(cachefile) or "") result = jsonc.parse(fs.readfile(cachefile) or "")
end end

View File

@@ -97,7 +97,7 @@ start()
action=0 action=0
fi fi
host=$(uci get hostacl.@rule[$idx].host 2>/dev/null) host=$(uci get hostacl.@rule[$idx].host 2>/dev/null | tr A-Z a-z)
host=$(echo $host | sed "s/,/ /g;s/'/ /g") host=$(echo $host | sed "s/,/ /g;s/'/ /g")
for HOST in $host; do for HOST in $host; do
echo add acl=${idx},${action},$HOST >/dev/hostacl_ctl echo add acl=${idx},${action},$HOST >/dev/hostacl_ctl

View File

@@ -21,13 +21,13 @@ define Download/geoip
HASH:=2445b44d9ae3ab9a867c9d1e0e244646c4c378622e14b9afaf3658ecf46a40b9 HASH:=2445b44d9ae3ab9a867c9d1e0e244646c4c378622e14b9afaf3658ecf46a40b9
endef endef
GEOSITE_VER:=20251203115157 GEOSITE_VER:=20251203130751
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER) GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
define Download/geosite define Download/geosite
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/ URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
URL_FILE:=dlc.dat URL_FILE:=dlc.dat
FILE:=$(GEOSITE_FILE) FILE:=$(GEOSITE_FILE)
HASH:=0a14ebf9162fd0e3486b15a40025b9c807d2d38dd4379830edbbb113ee75ea80 HASH:=1065398cc7531d80f93bdad69e6f464c9dff05e27f58cfc98728c2fa9c0d7833
endef endef
GEOSITE_IRAN_VER:=202512010051 GEOSITE_IRAN_VER:=202512010051