Update luci-app-passwall2.patch

This commit is contained in:
kiddin9
2026-08-09 00:28:59 +08:00
committed by GitHub
parent 6ad26db225
commit d879732de0
+12 -12
View File
@@ -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