mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-09-10 18:34:18 +08:00
Update luci-app-passwall2.patch
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user