From 6bc7cb9e81d523d9f22ceb83c4e5a2094ab03f47 Mon Sep 17 00:00:00 2001 From: kenzok8 Date: Sat, 22 Mar 2025 00:26:16 +0800 Subject: [PATCH] update 2025-03-22 00:26:16 --- adguardhome/Makefile | 6 +-- luci-app-homeassistant/Makefile | 2 +- .../root/usr/libexec/istorec/homeassistant.sh | 44 ++++++------------- luci-app-immich/Makefile | 2 +- .../root/usr/libexec/istorec/immich.sh | 44 ++++++------------- luci-app-ittools/Makefile | 2 +- .../root/usr/libexec/istorec/ittools.sh | 44 ++++++------------- luci-app-jellyfin/Makefile | 2 +- .../root/usr/libexec/istorec/jellyfin.sh | 44 ++++++------------- .../luasrc/passwall/util_sing-box.lua | 35 +++++++-------- luci-app-wxedge/Makefile | 2 +- .../root/usr/libexec/istorec/wxedge.sh | 44 ++++++------------- 12 files changed, 90 insertions(+), 181 deletions(-) diff --git a/adguardhome/Makefile b/adguardhome/Makefile index 550b02f82..eedecbd8a 100644 --- a/adguardhome/Makefile +++ b/adguardhome/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=adguardhome -PKG_VERSION:=0.107.58 +PKG_VERSION:=0.107.59 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/AdGuardHome/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=da6a52764090d8350d55bc14b957ec6afdee0bd21b34b010796e220bde5e9186 +PKG_HASH:=b8bbc2d16394770520da4febd000e66d6df5839a230abea4d160f117bf3f11ed PKG_BUILD_DIR:=$(BUILD_DIR)/AdGuardHome-$(PKG_VERSION) PKG_LICENSE:=GPL-3.0-only @@ -58,7 +58,7 @@ define Download/adguardhome-frontend URL:=https://github.com/AdguardTeam/AdGuardHome/releases/download/v$(PKG_VERSION)/ URL_FILE:=AdGuardHome_frontend.tar.gz FILE:=$(FRONTEND_FILE) - HASH:=7bda3b9e33757c5a58a211b8a3d71a76a0311327fd009adf0935e6a3c4313f9f + HASH:=955051153aafdc924a7a4b05307628bd91b3b22c68c8f3e3c49a8b44e052c285 endef define Build/Prepare diff --git a/luci-app-homeassistant/Makefile b/luci-app-homeassistant/Makefile index a2c336997..b88e27587 100644 --- a/luci-app-homeassistant/Makefile +++ b/luci-app-homeassistant/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.1.3-20250320 +PKG_VERSION:=1.1.4-20250321 PKG_RELEASE:= LUCI_TITLE:=LuCI support for homeassistant diff --git a/luci-app-homeassistant/root/usr/libexec/istorec/homeassistant.sh b/luci-app-homeassistant/root/usr/libexec/istorec/homeassistant.sh index a89177cf2..5d08e236d 100755 --- a/luci-app-homeassistant/root/usr/libexec/istorec/homeassistant.sh +++ b/luci-app-homeassistant/root/usr/libexec/istorec/homeassistant.sh @@ -5,47 +5,29 @@ shift 1 istoreenhance_pull() { local image_name="$1" - local isInstall=$(command -v iStoreEnhance) - local isRun=$(pgrep iStoreEnhance) + echo "docker pull ${image_name}" + docker pull "$image_name" + if [ $? -ne 0 ]; then + local isInstall=$(command -v iStoreEnhance) + local isRun=$(pgrep iStoreEnhance) + # 判断iStoreEnhance是否运行 + if [ -n "$isRun" ]; then + # 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址 + local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}') - # 判断iStoreEnhance是否运行 - if [ -n "$isRun" ]; then - # 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址 - local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}') - - if [[ -n "$registry_mirror" ]]; then - # 提取主机和端口部分 - local registry_host=$(echo ${registry_mirror} | sed -E 's|^https?://([^/]+).*|\1|') - # 拼接完整的镜像地址 - local full_image_name="$registry_host/$image_name" - echo "istoreenhance_pull ${full_image_name}" - # 直接拉取镜像 - docker pull "$full_image_name" - if [ $? -ne 0 ]; then + if [[ -n "$registry_mirror" ]]; then echo "istoreenhance_pull failed" - exit 1 + else + echo "download failed, not found registry.linkease.net" fi else - echo "istoreenhance_pull ${image_name}" - docker pull "$image_name" - if [ $? -ne 0 ]; then - echo "download failed, not found registry.linkease.net" - exit 1 - fi - fi - else - # 否则运行 docker pull - echo "docker pull ${image_name}" - docker pull "$image_name" - if [ $? -ne 0 ]; then - # 判断是否安装 iStoreEnhance if [ -z "$isInstall" ]; then echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\"" else echo "download failed, enable istoreenhance to speedup" fi - exit 1 fi + exit 1 fi } diff --git a/luci-app-immich/Makefile b/luci-app-immich/Makefile index 55d87c403..30f98c992 100644 --- a/luci-app-immich/Makefile +++ b/luci-app-immich/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.0.1-20250320 +PKG_VERSION:=1.0.2-20250321 PKG_RELEASE:= LUCI_TITLE:=LuCI support for Immich diff --git a/luci-app-immich/root/usr/libexec/istorec/immich.sh b/luci-app-immich/root/usr/libexec/istorec/immich.sh index 539939005..12a95c551 100755 --- a/luci-app-immich/root/usr/libexec/istorec/immich.sh +++ b/luci-app-immich/root/usr/libexec/istorec/immich.sh @@ -6,47 +6,29 @@ shift 1 istoreenhance_pull() { local image_name="$1" - local isInstall=$(command -v iStoreEnhance) - local isRun=$(pgrep iStoreEnhance) + echo "docker pull ${image_name}" + docker pull "$image_name" + if [ $? -ne 0 ]; then + local isInstall=$(command -v iStoreEnhance) + local isRun=$(pgrep iStoreEnhance) + # 判断iStoreEnhance是否运行 + if [ -n "$isRun" ]; then + # 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址 + local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}') - # 判断iStoreEnhance是否运行 - if [ -n "$isRun" ]; then - # 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址 - local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}') - - if [[ -n "$registry_mirror" ]]; then - # 提取主机和端口部分 - local registry_host=$(echo ${registry_mirror} | sed -E 's|^https?://([^/]+).*|\1|') - # 拼接完整的镜像地址 - local full_image_name="$registry_host/$image_name" - echo "istoreenhance_pull ${full_image_name}" - # 直接拉取镜像 - docker pull "$full_image_name" - if [ $? -ne 0 ]; then + if [[ -n "$registry_mirror" ]]; then echo "istoreenhance_pull failed" - exit 1 + else + echo "download failed, not found registry.linkease.net" fi else - echo "istoreenhance_pull ${image_name}" - docker pull "$image_name" - if [ $? -ne 0 ]; then - echo "download failed, not found registry.linkease.net" - exit 1 - fi - fi - else - # 否则运行 docker pull - echo "docker pull ${image_name}" - docker pull "$image_name" - if [ $? -ne 0 ]; then - # 判断是否安装 iStoreEnhance if [ -z "$isInstall" ]; then echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\"" else echo "download failed, enable istoreenhance to speedup" fi - exit 1 fi + exit 1 fi } diff --git a/luci-app-ittools/Makefile b/luci-app-ittools/Makefile index 8b778ecfb..58b84507c 100644 --- a/luci-app-ittools/Makefile +++ b/luci-app-ittools/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.0.3-20250320 +PKG_VERSION:=1.0.4-20250321 PKG_RELEASE:= LUCI_TITLE:=LuCI support for ITTools diff --git a/luci-app-ittools/root/usr/libexec/istorec/ittools.sh b/luci-app-ittools/root/usr/libexec/istorec/ittools.sh index 0760cc1a8..4a51a9068 100755 --- a/luci-app-ittools/root/usr/libexec/istorec/ittools.sh +++ b/luci-app-ittools/root/usr/libexec/istorec/ittools.sh @@ -6,47 +6,29 @@ shift 1 istoreenhance_pull() { local image_name="$1" - local isInstall=$(command -v iStoreEnhance) - local isRun=$(pgrep iStoreEnhance) + echo "docker pull ${image_name}" + docker pull "$image_name" + if [ $? -ne 0 ]; then + local isInstall=$(command -v iStoreEnhance) + local isRun=$(pgrep iStoreEnhance) + # 判断iStoreEnhance是否运行 + if [ -n "$isRun" ]; then + # 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址 + local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}') - # 判断iStoreEnhance是否运行 - if [ -n "$isRun" ]; then - # 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址 - local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}') - - if [[ -n "$registry_mirror" ]]; then - # 提取主机和端口部分 - local registry_host=$(echo ${registry_mirror} | sed -E 's|^https?://([^/]+).*|\1|') - # 拼接完整的镜像地址 - local full_image_name="$registry_host/$image_name" - echo "istoreenhance_pull ${full_image_name}" - # 直接拉取镜像 - docker pull "$full_image_name" - if [ $? -ne 0 ]; then + if [[ -n "$registry_mirror" ]]; then echo "istoreenhance_pull failed" - exit 1 + else + echo "download failed, not found registry.linkease.net" fi else - echo "istoreenhance_pull ${image_name}" - docker pull "$image_name" - if [ $? -ne 0 ]; then - echo "download failed, not found registry.linkease.net" - exit 1 - fi - fi - else - # 否则运行 docker pull - echo "docker pull ${image_name}" - docker pull "$image_name" - if [ $? -ne 0 ]; then - # 判断是否安装 iStoreEnhance if [ -z "$isInstall" ]; then echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\"" else echo "download failed, enable istoreenhance to speedup" fi - exit 1 fi + exit 1 fi } diff --git a/luci-app-jellyfin/Makefile b/luci-app-jellyfin/Makefile index f7a9a70f7..05e826396 100644 --- a/luci-app-jellyfin/Makefile +++ b/luci-app-jellyfin/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.2.1-20250320 +PKG_VERSION:=1.2.2-20250321 PKG_RELEASE:= LUCI_TITLE:=LuCI support for jellyfin diff --git a/luci-app-jellyfin/root/usr/libexec/istorec/jellyfin.sh b/luci-app-jellyfin/root/usr/libexec/istorec/jellyfin.sh index 31d88795c..13e861c66 100755 --- a/luci-app-jellyfin/root/usr/libexec/istorec/jellyfin.sh +++ b/luci-app-jellyfin/root/usr/libexec/istorec/jellyfin.sh @@ -10,47 +10,29 @@ IMAGE_NAME='default' istoreenhance_pull() { local image_name="$1" - local isInstall=$(command -v iStoreEnhance) - local isRun=$(pgrep iStoreEnhance) + echo "docker pull ${image_name}" + docker pull "$image_name" + if [ $? -ne 0 ]; then + local isInstall=$(command -v iStoreEnhance) + local isRun=$(pgrep iStoreEnhance) + # 判断iStoreEnhance是否运行 + if [ -n "$isRun" ]; then + # 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址 + local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}') - # 判断iStoreEnhance是否运行 - if [ -n "$isRun" ]; then - # 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址 - local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}') - - if [[ -n "$registry_mirror" ]]; then - # 提取主机和端口部分 - local registry_host=$(echo ${registry_mirror} | sed -E 's|^https?://([^/]+).*|\1|') - # 拼接完整的镜像地址 - local full_image_name="$registry_host/$image_name" - echo "istoreenhance_pull ${full_image_name}" - # 直接拉取镜像 - docker pull "$full_image_name" - if [ $? -ne 0 ]; then + if [[ -n "$registry_mirror" ]]; then echo "istoreenhance_pull failed" - exit 1 + else + echo "download failed, not found registry.linkease.net" fi else - echo "istoreenhance_pull ${image_name}" - docker pull "$image_name" - if [ $? -ne 0 ]; then - echo "download failed, not found registry.linkease.net" - exit 1 - fi - fi - else - # 否则运行 docker pull - echo "docker pull ${image_name}" - docker pull "$image_name" - if [ $? -ne 0 ]; then - # 判断是否安装 iStoreEnhance if [ -z "$isInstall" ]; then echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\"" else echo "download failed, enable istoreenhance to speedup" fi - exit 1 fi + exit 1 fi } diff --git a/luci-app-passwall/luasrc/passwall/util_sing-box.lua b/luci-app-passwall/luasrc/passwall/util_sing-box.lua index 37f1fd475..1d23aac0c 100644 --- a/luci-app-passwall/luasrc/passwall/util_sing-box.lua +++ b/luci-app-passwall/luasrc/passwall/util_sing-box.lua @@ -15,9 +15,9 @@ local geoip_all_tag = {} local srss_path = "/tmp/etc/" .. appname .."/srss/" local function convert_geofile() - local geo_path = uci:get(appname, "@global_rules[0]", "v2ray_location_asset") or "/usr/share/v2ray/" - local geosite_path = geo_path:match("^(.*)/") .. "/geosite.dat" - local geoip_path = geo_path:match("^(.*)/") .. "/geoip.dat" + local geo_dir = (uci:get(appname, "@global_rules[0]", "v2ray_location_asset") or "/usr/share/v2ray/"):match("^(.*)/") + local geosite_path = geo_dir .. "/geosite.dat" + local geoip_path = geo_dir .. "/geoip.dat" if not api.is_finded("geoview") then api.log("* 注意:缺少 geoview 组件,Sing-Box 分流将无法启用!") return @@ -25,24 +25,23 @@ local function convert_geofile() if not fs.access(srss_path) then fs.mkdir(srss_path) end - if next(geosite_all_tag) and fs.access(geosite_path) then - for k,v in pairs(geosite_all_tag) do - local srs_file = srss_path .. "geosite-" .. k ..".srs" - if not fs.access(srs_file) then - sys.exec("geoview -type geosite -action convert -input " .. geosite_path .. " -list '" .. k .. "' -output " .. srs_file .. " -lowmem=true") - --api.log("* 转换geosite:" .. k .. " 到 Sing-Box 规则集二进制文件") - end - end - end - if next(geoip_all_tag) and fs.access(geoip_path) then - for k,v in pairs(geoip_all_tag) do - local srs_file = srss_path .. "geoip-" .. k ..".srs" - if not fs.access(srs_file) then - sys.exec("geoview -type geoip -action convert -input " .. geoip_path .. " -list '" .. k .. "' -output " .. srs_file .. " -lowmem=true") - --api.log("* 转换geoip:" .. k .. " 到 Sing-Box 规则集二进制文件") + local function convert(file_path, prefix, tags) + if next(tags) and fs.access(file_path) then + for k in pairs(tags) do + local srs_file = srss_path .. prefix .. "-" .. k .. ".srs" + if not fs.access(srs_file) then + local cmd = string.format("geoview -type %s -action convert -input %s -list '%s' -output %s -lowmem=true", + prefix, file_path, k, srs_file) + sys.exec(cmd) + local status = fs.access(srs_file) and "成功。" or "失败!" + api.log(string.format(" - 转换 %s:%s ... %s", prefix, k, status)) + end end end end + api.log("Sing-Box 规则集转换:") + convert(geosite_path, "geosite", geosite_all_tag) + convert(geoip_path, "geoip", geoip_all_tag) end local new_port diff --git a/luci-app-wxedge/Makefile b/luci-app-wxedge/Makefile index cf4d4b0cb..4f36b7aec 100644 --- a/luci-app-wxedge/Makefile +++ b/luci-app-wxedge/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.1.5-20250319 +PKG_VERSION:=1.1.6-20250321 PKG_RELEASE:= LUCI_TITLE:=LuCI support for wxedge diff --git a/luci-app-wxedge/root/usr/libexec/istorec/wxedge.sh b/luci-app-wxedge/root/usr/libexec/istorec/wxedge.sh index f3874456d..62fca8068 100755 --- a/luci-app-wxedge/root/usr/libexec/istorec/wxedge.sh +++ b/luci-app-wxedge/root/usr/libexec/istorec/wxedge.sh @@ -10,47 +10,29 @@ shift 1 # 4. 反之运行docker pull istoreenhance_pull() { local image_name="$1" - local isInstall=$(command -v iStoreEnhance) - local isRun=$(pgrep iStoreEnhance) + echo "docker pull ${image_name}" + docker pull "$image_name" + if [ $? -ne 0 ]; then + local isInstall=$(command -v iStoreEnhance) + local isRun=$(pgrep iStoreEnhance) + # 判断iStoreEnhance是否运行 + if [ -n "$isRun" ]; then + # 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址 + local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}') - # 判断iStoreEnhance是否运行 - if [ -n "$isRun" ]; then - # 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址 - local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}') - - if [[ -n "$registry_mirror" ]]; then - # 提取主机和端口部分 - local registry_host=$(echo ${registry_mirror} | sed -E 's|^https?://([^/]+).*|\1|') - # 拼接完整的镜像地址 - local full_image_name="$registry_host/$image_name" - echo "istoreenhance_pull ${full_image_name}" - # 直接拉取镜像 - docker pull "$full_image_name" - if [ $? -ne 0 ]; then + if [[ -n "$registry_mirror" ]]; then echo "istoreenhance_pull failed" - exit 1 + else + echo "download failed, not found registry.linkease.net" fi else - echo "istoreenhance_pull ${image_name}" - docker pull "$image_name" - if [ $? -ne 0 ]; then - echo "download failed, not found registry.linkease.net" - exit 1 - fi - fi - else - # 否则运行 docker pull - echo "docker pull ${image_name}" - docker pull "$image_name" - if [ $? -ne 0 ]; then - # 判断是否安装 iStoreEnhance if [ -z "$isInstall" ]; then echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\"" else echo "download failed, enable istoreenhance to speedup" fi - exit 1 fi + exit 1 fi }