From 5d624948636f6f758c210f470c1d03805dca18b4 Mon Sep 17 00:00:00 2001 From: kiddin9 <48883331+kiddin9@users.noreply.github.com> Date: Sun, 9 Aug 2026 00:28:59 +0800 Subject: [PATCH] Update luci-app-passwall2.patch --- .github/diy/patches/luci-app-passwall2.patch | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/diy/patches/luci-app-passwall2.patch b/.github/diy/patches/luci-app-passwall2.patch index 4061b30d5..684eddc82 100644 --- a/.github/diy/patches/luci-app-passwall2.patch +++ b/.github/diy/patches/luci-app-passwall2.patch @@ -54,16 +54,16 @@ --- a/luci-app-passwall2/luasrc/controller/passwall2.lua +++ b/luci-app-passwall2/luasrc/controller/passwall2.lua -@@ -95,6 +95,7 @@ function index() - entry({"admin", "services", appname, "subscribe_manual"}, call("subscribe_manual")).leaf = true - entry({"admin", "services", appname, "subscribe_manual_all"}, call("subscribe_manual_all")).leaf = true - entry({"admin", "services", appname, "flush_set"}, call("flush_set")).leaf = true +@@ -32,6 +32,7 @@ function index() + end + e.dependent = true + e.acl_depends = { "luci-app-passwall2" } + entry({"admin", "services", appname, "ip"}, call('check_ip')).leaf = true - - --[[Components update]] - entry({"admin", "services", appname, "check_passwall2"}, call("app_check")).leaf = true -@@ -114,6 +115,61 @@ function index() - entry({"admin", "services", appname, "geo_view"}, call("geo_view")).leaf = true + --[[ Client ]] + entry({"admin", "services", appname, "settings"}, cbi(appname .. "/client/global"), _("Basic Settings"), 1).dependent = true + entry({"admin", "services", appname, "node_list"}, cbi(appname .. "/client/node_list"), _("Node List"), 2).dependent = true +@@ -137,6 +138,61 @@ local function http_write_json_error(data) + http.write(jsonStringify({code = 0, data = data})) end +function check_site(host, port) @@ -121,9 +121,9 @@ + luci.http.write_json(e) +end + - local function http_write_json(content) - http.prepare_content("application/json") - http.write(jsonStringify(content or {code = 1})) + function reset_config() + uci:revert(appname) + luci.sys.call("echo '' > /tmp/log/passwall2.log") --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/global.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/global.lua