From d335d702db7d23afc0ea0d7ee036b7acdf93414c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 28 May 2026 21:16:44 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=90=20Sync=202026-05-28=2021:16:44?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ipv6-neigh/Cargo.lock | 2 +- ipv6-neigh/Cargo.toml | 2 +- ipv6-neigh/Makefile | 2 +- luci-app-passwall/Makefile | 2 +- luci-app-passwall/luasrc/controller/passwall.lua | 12 +++++++++--- .../luasrc/model/cbi/passwall/client/global.lua | 2 +- .../luasrc/view/passwall/global/backup.htm | 9 +++------ luci-app-ttl/Makefile | 2 +- luci-app-ttl/root/etc/init.d/ttl | 5 ++++- 9 files changed, 22 insertions(+), 16 deletions(-) diff --git a/ipv6-neigh/Cargo.lock b/ipv6-neigh/Cargo.lock index fd3574f35..7a9901de8 100644 --- a/ipv6-neigh/Cargo.lock +++ b/ipv6-neigh/Cargo.lock @@ -385,7 +385,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hickory-proto" version = "0.27.0-alpha.1" -source = "git+https://github.com/hickory-dns/hickory-dns.git?rev=ee7ba64757eca61d86f323ef992eba482605d7c3#ee7ba64757eca61d86f323ef992eba482605d7c3" +source = "git+https://github.com/hickory-dns/hickory-dns.git?rev=50ee6c13a2272d42e5d03eff84dca8efd5109d96#50ee6c13a2272d42e5d03eff84dca8efd5109d96" dependencies = [ "bitflags", "data-encoding", diff --git a/ipv6-neigh/Cargo.toml b/ipv6-neigh/Cargo.toml index da40a7c64..ffe52c6fc 100644 --- a/ipv6-neigh/Cargo.toml +++ b/ipv6-neigh/Cargo.toml @@ -13,7 +13,7 @@ futures = "0.3.32" netlink-packet-route = {version = "0.30" } netlink-packet-core= {version ="0.8"} clap = { version = "4.6", default-features = false, features = ["cargo", "derive", "help", "std", "suggestions"] } -hickory-proto = { git = "https://github.com/hickory-dns/hickory-dns.git", rev = "ee7ba64757eca61d86f323ef992eba482605d7c3", features = ["dnssec-ring"] } +hickory-proto = { git = "https://github.com/hickory-dns/hickory-dns.git", rev = "50ee6c13a2272d42e5d03eff84dca8efd5109d96", features = ["dnssec-ring"] } ubus = "0.1.7" serde_json = "1.0.150" log = "0.4" diff --git a/ipv6-neigh/Makefile b/ipv6-neigh/Makefile index 0ccf770eb..5cc684780 100644 --- a/ipv6-neigh/Makefile +++ b/ipv6-neigh/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ipv6-neigh PKG_VERSION:=0.1.0 -PKG_RELEASE:=16 +PKG_RELEASE:=17 PKG_BUILD_DEPENDS:=rust/host PKG_BUILD_PARALLEL:=1 diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index 3f25abd5f..2d0d020b7 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.5.20 -PKG_RELEASE:=139 +PKG_RELEASE:=140 PKG_PO_VERSION:=$(PKG_VERSION) PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall/luasrc/controller/passwall.lua b/luci-app-passwall/luasrc/controller/passwall.lua index 5dca7ad1f..d440dd57e 100644 --- a/luci-app-passwall/luasrc/controller/passwall.lua +++ b/luci-app-passwall/luasrc/controller/passwall.lua @@ -24,7 +24,6 @@ function index() local uci = api.uci -- in function index() local fs = api.fs entry({"admin", "services", appname}).dependent = true - entry({"admin", "services", appname, "reset_config"}, call("reset_config")).leaf = true entry({"admin", "services", appname, "show"}, call("show_menu")).leaf = true entry({"admin", "services", appname, "hide"}, call("hide_menu")).leaf = true entry({"admin", "services", appname, "ip"}, call('check_ip')).leaf = true @@ -115,6 +114,7 @@ function index() --[[Backup]] entry({"admin", "services", appname, "create_backup"}, call("create_backup")).leaf = true entry({"admin", "services", appname, "restore_backup"}, call("restore_backup")).leaf = true + entry({"admin", "services", appname, "reset_config"}, call("reset_config")).leaf = true --[[geoview]] entry({"admin", "services", appname, "geo_view"}, call("geo_view")).leaf = true @@ -138,9 +138,15 @@ local function http_write_json_error(data) end function reset_config() + uci:revert(appname) + luci.sys.call("echo '' > /tmp/log/passwall.log") luci.sys.call('/etc/init.d/passwall stop') - luci.sys.call('[ -f "/usr/share/passwall/0_default_config" ] && cp -f /usr/share/passwall/0_default_config /etc/config/passwall') - http.redirect(api.url()) + if luci.sys.call('[ -s "/usr/share/passwall/0_default_config" ]') == 0 then + luci.sys.call('cp -f /usr/share/passwall/0_default_config /etc/config/passwall') + api.log(" * 恢复默认配置成功。") + else + api.log(" * 找不到默认配置文件,重置失败!") + end end function show_menu() diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua index ab1f8841f..9d19ae149 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua @@ -95,7 +95,7 @@ end m:append(Template(appname .. "/global/status")) -global_cfgid = m:get("@global[0]")[".name"] +global_cfgid = (m:get("@global[0]") or {})[".name"] or "" s = m:section(TypedSection, "global") s.anonymous = true diff --git a/luci-app-passwall/luasrc/view/passwall/global/backup.htm b/luci-app-passwall/luasrc/view/passwall/global/backup.htm index f92d529c9..3b31964ab 100644 --- a/luci-app-passwall/luasrc/view/passwall/global/backup.htm +++ b/luci-app-passwall/luasrc/view/passwall/global/backup.htm @@ -150,12 +150,9 @@ local api = require "luci.passwall.api" if (confirm("<%: Do you want to restore the client to default settings?%>")) { setTimeout(function () { if (confirm("<%: Are you sure you want to restore the client to default settings?%>")) { - var xhr1 = new XMLHttpRequest(); - xhr1.open("GET",'<%= api.url("clear_log") %>', false); - xhr1.send(); - var xhr2 = new XMLHttpRequest(); - xhr2.open("GET",'<%= api.url("reset_config") %>', false); - xhr2.send(); + const xhr = new XMLHttpRequest(); + xhr.open("GET",'<%= api.url("reset_config") %>', false); + xhr.send(); window.location.href = '<%= api.url("log") %>' } }, 1000); diff --git a/luci-app-ttl/Makefile b/luci-app-ttl/Makefile index 5965fcf98..3b73962a4 100644 --- a/luci-app-ttl/Makefile +++ b/luci-app-ttl/Makefile @@ -11,7 +11,7 @@ LUCI_TITLE:=Antitethering module for luci-app-firewall PKG_LICENSE:=Apache-2.0 PKG_VERSION:=0.0.6 -PKG_RELEASE:=2 +PKG_RELEASE:=3 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/luci-app-ttl/root/etc/init.d/ttl b/luci-app-ttl/root/etc/init.d/ttl index ccf5cde69..2b001a580 100755 --- a/luci-app-ttl/root/etc/init.d/ttl +++ b/luci-app-ttl/root/etc/init.d/ttl @@ -9,7 +9,10 @@ start_service(){ } reload_service(){ - sleep 10 && start & + ( + flock -n 9 || exit 0 + sleep 10 && start + ) 9>/var/lock/ttl-reload.lock & } service_triggers() {