From c5a2a2ae78dc67e4af48f8701e2a27f8eb205719 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 20 Aug 2026 23:56:12 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=A4=20Sync=202026-08-20=2023:56:12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linkease-common-bin/Makefile | 4 +-- linkease/Makefile | 4 +-- linkeasefull/Makefile | 4 +-- luci-app-passwall/Makefile | 2 +- .../luasrc/passwall/util_sing-box.lua | 6 +---- .../root/etc/hotplug.d/ntp/30-passwall-resync | 27 +++++++++++++++++++ luci-app-passwall2/Makefile | 4 +-- .../luasrc/passwall2/util_sing-box.lua | 6 +---- .../etc/hotplug.d/ntp/30-passwall2-resync | 27 +++++++++++++++++++ .../root/usr/share/passwall2/subscribe.lua | 2 +- 10 files changed, 66 insertions(+), 20 deletions(-) create mode 100644 luci-app-passwall/root/etc/hotplug.d/ntp/30-passwall-resync create mode 100644 luci-app-passwall2/root/etc/hotplug.d/ntp/30-passwall2-resync diff --git a/linkease-common-bin/Makefile b/linkease-common-bin/Makefile index 05726d3f..c98d83b7 100644 --- a/linkease-common-bin/Makefile +++ b/linkease-common-bin/Makefile @@ -12,7 +12,7 @@ PKG_ARCH_LINKEASE:=$(ARCH) PKG_NAME:=linkease-common-bin # use PKG_SOURCE_DATE instead of PKG_VERSION for compitable PKG_SOURCE_DATE:=1.7.5 -PKG_RELEASE:=10 +PKG_RELEASE:=11 ARCH_HEXCODE:= ifeq ($(ARCH),x86_64) @@ -28,7 +28,7 @@ else ifeq ($(ARCH),mipsel) ARCH_HEXCODE=1b0c endif -PKG_SOURCE_VERSION:=2f7e306c71c36126c320b4e2f0130fda4f3c15bf +PKG_SOURCE_VERSION:=b5611e40da63fec2b6a0bb93b272fe0fdc704370 PKG_SOURCE:=linkease-common-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE).tar.gz PKG_SOURCE_URL:=https://github.com/istoreos/istoreos-app-hub/releases/download/linkease-runtime-v$(PKG_SOURCE_DATE)/ PKG_BUILD_DIR:=$(BUILD_DIR)/linkease-common-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE) diff --git a/linkease/Makefile b/linkease/Makefile index 8910e3cb..9ae7345a 100644 --- a/linkease/Makefile +++ b/linkease/Makefile @@ -12,7 +12,7 @@ PKG_ARCH_LINKEASE:=$(ARCH) PKG_NAME:=linkease # use PKG_SOURCE_DATE instead of PKG_VERSION for compitable PKG_SOURCE_DATE:=1.7.5 -PKG_RELEASE:=13 +PKG_RELEASE:=14 ARCH_HEXCODE:= ifeq ($(ARCH),x86_64) @@ -28,7 +28,7 @@ else ifeq ($(ARCH),mipsel) ARCH_HEXCODE=1b0c endif -PKG_SOURCE_VERSION:=2f7e306c71c36126c320b4e2f0130fda4f3c15bf +PKG_SOURCE_VERSION:=b5611e40da63fec2b6a0bb93b272fe0fdc704370 PKG_SOURCE:=linkease-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE).tar.gz PKG_SOURCE_URL:=https://github.com/istoreos/istoreos-app-hub/releases/download/linkease-runtime-v$(PKG_SOURCE_DATE)/ PKG_BUILD_DIR:=$(BUILD_DIR)/linkease-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE) diff --git a/linkeasefull/Makefile b/linkeasefull/Makefile index 68af0588..2490da45 100644 --- a/linkeasefull/Makefile +++ b/linkeasefull/Makefile @@ -11,7 +11,7 @@ PKG_ARCH_LINKEASE:=$(ARCH) PKG_NAME:=linkeasefull # use PKG_SOURCE_DATE instead of PKG_VERSION for compitable PKG_SOURCE_DATE:=3.0.11 -PKG_RELEASE:=12 +PKG_RELEASE:=13 ARCH_HEXCODE:= ifeq ($(ARCH),x86_64) @@ -24,7 +24,7 @@ LINKEASE_RUNTIME_ARCH:=arm64 PKG_HASH:=skip endif -PKG_SOURCE_VERSION:=2f7e306c71c36126c320b4e2f0130fda4f3c15bf +PKG_SOURCE_VERSION:=b5611e40da63fec2b6a0bb93b272fe0fdc704370 PKG_SOURCE:=linkease-runtime-$(PKG_SOURCE_DATE)-linux-$(LINKEASE_RUNTIME_ARCH).tar.gz PKG_SOURCE_URL:=https://github.com/istoreos/istoreos-app-hub/releases/download/linkeasefull-runtime-v$(PKG_SOURCE_DATE)/ PKG_BUILD_DIR:=$(BUILD_DIR)/linkease-runtime-$(PKG_SOURCE_DATE)-linux-$(LINKEASE_RUNTIME_ARCH) diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index 8d9ab08f..c85ad0f4 100644 --- a/luci-app-passwall/Makefile +++ b/luci-app-passwall/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall PKG_VERSION:=26.8.19 -PKG_RELEASE:=232 +PKG_RELEASE:=233 PKG_PO_VERSION:=$(PKG_VERSION) PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall/luasrc/passwall/util_sing-box.lua b/luci-app-passwall/luasrc/passwall/util_sing-box.lua index 46856ff8..f550fab3 100644 --- a/luci-app-passwall/luasrc/passwall/util_sing-box.lua +++ b/luci-app-passwall/luasrc/passwall/util_sing-box.lua @@ -778,7 +778,7 @@ function gen_config_server(node) u.username = user.username u.password = user.password end - if node.protocol == "shadowsocks" or node.protocol == "trojan" then + if node.protocol == "shadowsocks" or node.protocol == "trojan" or node.protocol == "hysteria2" or node.protocol == "anytls" then u.name = user.username u.password = user.password end @@ -801,10 +801,6 @@ function gen_config_server(node) u.password = user.password u.uuid = user.uuid end - if node.protocol == "hysteria2" then - u.name = user.username - u.password = user.password - end if node.protocol == "wireguard" then u.public_key = user.wireguard_public_key u.pre_shared_key = user.wireguard_pre_shared_key diff --git a/luci-app-passwall/root/etc/hotplug.d/ntp/30-passwall-resync b/luci-app-passwall/root/etc/hotplug.d/ntp/30-passwall-resync new file mode 100644 index 00000000..5f020b9a --- /dev/null +++ b/luci-app-passwall/root/etc/hotplug.d/ntp/30-passwall-resync @@ -0,0 +1,27 @@ +#!/bin/sh + +# Devices without a hardware RTC boot with a wrong system clock: sysfixtime can +# only restore the mtime of the newest file under /etc, so the clock is usually +# hours behind after a cold boot. passwall is then started by +# /etc/hotplug.d/iface/98-passwall on ifup, which typically happens before NTP +# has corrected the time, and time-sensitive handshakes (VMess AEAD, TLS) fail. +# +# Nothing restarts passwall once the clock is corrected, so it stays broken +# until the user restarts it manually. Restart once when ntpd reports that the +# time is valid -- the same approach dnsmasq uses for DNSSEC in +# /etc/hotplug.d/ntp/25-dnsmasqsec. + +[ "$ACTION" = "stratum" ] || exit 0 + +. /usr/share/passwall/utils.sh + +NTP_LOCK_FILE="${LOCK_PATH}/${CONFIG}_ntp.lock" +[ -f "${NTP_LOCK_FILE}" ] && exit 0 + +([ "$(get_cache_var "ENABLED_DEFAULT_ACL")" = "1" ] || [ "$(get_cache_var "ENABLED_ACLS")" = "1" ]) && [ -f ${LOCK_PATH}/${CONFIG}_ready.lock ] && { + + echo $$ > ${NTP_LOCK_FILE} + + /etc/init.d/${CONFIG} restart >/dev/null 2>&1 & + logger -p notice -t network -s "${CONFIG}: restart after NTP time became valid" +} diff --git a/luci-app-passwall2/Makefile b/luci-app-passwall2/Makefile index 1da637d4..5fbb34db 100644 --- a/luci-app-passwall2/Makefile +++ b/luci-app-passwall2/Makefile @@ -6,8 +6,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall2 -PKG_VERSION:=26.8.17 -PKG_RELEASE:=93 +PKG_VERSION:=26.8.20 +PKG_RELEASE:=94 PKG_PO_VERSION:=$(PKG_VERSION) PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua b/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua index a5e81a55..ce771cc7 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua @@ -800,7 +800,7 @@ function gen_config_server(node) u.username = user.username u.password = user.password end - if node.protocol == "shadowsocks" or node.protocol == "trojan" then + if node.protocol == "shadowsocks" or node.protocol == "trojan" or node.protocol == "hysteria2" or node.protocol == "anytls" then u.name = user.username u.password = user.password end @@ -823,10 +823,6 @@ function gen_config_server(node) u.password = user.password u.uuid = user.uuid end - if node.protocol == "hysteria2" then - u.name = user.username - u.password = user.password - end if node.protocol == "wireguard" then u.public_key = user.wireguard_public_key u.pre_shared_key = user.wireguard_pre_shared_key diff --git a/luci-app-passwall2/root/etc/hotplug.d/ntp/30-passwall2-resync b/luci-app-passwall2/root/etc/hotplug.d/ntp/30-passwall2-resync new file mode 100644 index 00000000..ebe31a10 --- /dev/null +++ b/luci-app-passwall2/root/etc/hotplug.d/ntp/30-passwall2-resync @@ -0,0 +1,27 @@ +#!/bin/sh + +# Devices without a hardware RTC boot with a wrong system clock: sysfixtime can +# only restore the mtime of the newest file under /etc, so the clock is usually +# hours behind after a cold boot. passwall2 is then started by +# /etc/hotplug.d/iface/98-passwall2 on ifup, which typically happens before NTP +# has corrected the time, and time-sensitive handshakes (VMess AEAD, TLS) fail. +# +# Nothing restarts passwall2 once the clock is corrected, so it stays broken +# until the user restarts it manually. Restart once when ntpd reports that the +# time is valid -- the same approach dnsmasq uses for DNSSEC in +# /etc/hotplug.d/ntp/25-dnsmasqsec. + +[ "$ACTION" = "stratum" ] || exit 0 + +. /usr/share/passwall2/utils.sh + +NTP_LOCK_FILE="${LOCK_PATH}/${CONFIG}_ntp.lock" +[ -f "${NTP_LOCK_FILE}" ] && exit 0 + +([ "$(get_cache_var "ENABLED_DEFAULT_ACL")" = "1" ] || [ "$(get_cache_var "ENABLED_ACLS")" = "1" ]) && [ -f ${LOCK_PATH}/${CONFIG}_ready.lock ] && { + + echo $$ > ${NTP_LOCK_FILE} + + /etc/init.d/${CONFIG} restart >/dev/null 2>&1 & + logger -p notice -t network -s "${CONFIG}: restart after NTP time became valid" +} diff --git a/luci-app-passwall2/root/usr/share/passwall2/subscribe.lua b/luci-app-passwall2/root/usr/share/passwall2/subscribe.lua index 70bb852f..f61436be 100755 --- a/luci-app-passwall2/root/usr/share/passwall2/subscribe.lua +++ b/luci-app-passwall2/root/usr/share/passwall2/subscribe.lua @@ -2011,7 +2011,7 @@ local function curl(url, file, ua, mode, hwid) end function get_headers() - local cache_file = CACHE_PATH .. "/sub_curl_headers" + local cache_file = api.CACHE_PATH .. "/sub_curl_headers" if fs.access(cache_file) then return luci.sys.exec("cat " .. cache_file) end