mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-03 12:03:56 +08:00
🚀 Sync 2026-10-28 01:43:31
This commit is contained in:
1 parent
e646593c56
commit
d42296f292
162 files changed
+356
-233
No files matched your search
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=26.10.22
|
||||
PKG_RELEASE:=350
|
||||
PKG_RELEASE:=351
|
||||
PKG_PO_VERSION:=$(PKG_VERSION)
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -33,7 +33,7 @@ local ss_method_old_list = {
|
||||
|
||||
local security_list = { "none", "auto", "aes-128-gcm", "chacha20-poly1305", "zero" }
|
||||
|
||||
local singbox_tags = luci.sys.exec(singbox_bin .. " version | grep 'Tags:' | awk '{print $2}'")
|
||||
local singbox_tags = api.get_singbox_tags()
|
||||
|
||||
local singbox_version = api.get_app_version("sing-box"):match("[^v]+")
|
||||
local version_ge_1_14_0 = api.compare_versions(singbox_version, ">=", "1.14.0")
|
||||
|
||||
@@ -27,7 +27,7 @@ s.type_name = type_name
|
||||
s.option_prefix = "singbox_"
|
||||
api.set_type_cbi(s)
|
||||
|
||||
local singbox_tags = luci.sys.exec(singbox_bin .. " version | grep 'Tags:' | awk '{print $2}'")
|
||||
local singbox_tags = api.get_singbox_tags()
|
||||
|
||||
local local_version = api.get_app_version("sing-box"):match("[^v]+")
|
||||
local version_ge_1_14_0 = api.compare_versions(local_version, ">=", "1.14.0")
|
||||
|
||||
@@ -888,7 +888,7 @@ function clone(org)
|
||||
return res
|
||||
end
|
||||
|
||||
function get_bin_version_cache(file, cmd)
|
||||
function get_bin_version_cache(file, cmd, sb_tags)
|
||||
if file and file ~= "" and fs.access(file) then
|
||||
chmod_755(file)
|
||||
local stat = fs.stat(file)
|
||||
@@ -897,16 +897,28 @@ function get_bin_version_cache(file, cmd)
|
||||
-- Use metadata to avoid hashing the entire binary on every lookup.
|
||||
cache_file = CACHE_PATH .. "/binver_" .. table.concat({stat.dev, stat.ino, stat.size, stat.mtime, stat.ctime}, "_")
|
||||
local cached = fs.readfile(cache_file)
|
||||
if cached and trim(cached) ~= "" then
|
||||
return trim(cached)
|
||||
local version = cached and trim(cached:match("^[^\n]*"))
|
||||
if version and version ~= "" then
|
||||
if sb_tags then
|
||||
return version, trim(cached:match("^[^\n]*\n([^\n]*)"))
|
||||
end
|
||||
return version
|
||||
end
|
||||
end
|
||||
local version = sys.exec(string.format("echo -n $(%s %s)", util.shellquote(file), cmd))
|
||||
local version, tags
|
||||
if sb_tags then
|
||||
local output = sys.exec(string.format("%s %s", util.shellquote(file), cmd))
|
||||
version = output:match("^sing%-box%s+version%s+(%S+)") or ""
|
||||
tags = trim(output:match("\nTags:[ \t]*([^\r\n]*)"))
|
||||
else
|
||||
version = sys.exec(string.format("echo -n $(%s %s)", util.shellquote(file), cmd))
|
||||
end
|
||||
if version and version ~= "" then
|
||||
if cache_file then
|
||||
fs.mkdirr(CACHE_PATH)
|
||||
fs.writefile(cache_file, version)
|
||||
fs.writefile(cache_file, sb_tags and (version .. "\n" .. tags .. "\n") or version)
|
||||
end
|
||||
if sb_tags then return version, tags end
|
||||
return version
|
||||
end
|
||||
end
|
||||
@@ -924,7 +936,14 @@ end
|
||||
|
||||
function get_app_version(app_name, file)
|
||||
if file == nil then file = get_app_path(app_name) end
|
||||
return get_bin_version_cache(file, com[app_name].cmd_version)
|
||||
local version = get_bin_version_cache(file, com[app_name].cmd_version, app_name == "sing-box")
|
||||
return version
|
||||
end
|
||||
|
||||
function get_singbox_tags()
|
||||
local file = get_app_path("sing-box")
|
||||
local _, tags = get_bin_version_cache(file, com["sing-box"].cmd_version, true)
|
||||
return tags or ""
|
||||
end
|
||||
|
||||
local function is_file(path)
|
||||
|
||||
@@ -46,7 +46,7 @@ _M["sing-box"] = {
|
||||
name = "Sing-Box",
|
||||
repo = "SagerNet/sing-box",
|
||||
get_url = gh_release_url,
|
||||
cmd_version = "version | awk '{print $3}' | sed -n 1P",
|
||||
cmd_version = "version",
|
||||
zipped = true,
|
||||
zipped_suffix = "tar.gz",
|
||||
default_path = "/usr/bin/sing-box",
|
||||
|
||||
@@ -451,12 +451,17 @@ table td, .table .td {
|
||||
.pw-filter select,
|
||||
.pw-filter input[type="search"],
|
||||
.pw-filter .cbi-button {
|
||||
box-sizing: border-box !important;
|
||||
width: auto !important;
|
||||
min-width: 6em;
|
||||
max-width: 22em;
|
||||
height: auto;
|
||||
padding: 0.15em 0.3em;
|
||||
margin: 0;
|
||||
height: 1.65rem !important;
|
||||
min-height: 0 !important;
|
||||
max-height: none !important;
|
||||
font: inherit !important;
|
||||
line-height: 1.2 !important;
|
||||
padding: 0.15em 0.3em !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.pw-filter .pw-filter-count {
|
||||
|
||||
Reference in new issue
Block a user