mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 07:35:13 +08:00
🐶 Sync 2026-04-22 19:30:41
This commit is contained in:
1 parent
1c5cd481db
commit
cbf0355421
56 files changed
+958
-2646
No files matched your search
@@ -775,7 +775,11 @@ function save_node_list_opt()
|
||||
end
|
||||
|
||||
function update_rules()
|
||||
local update = http.formvalue("update")
|
||||
local update = http.formvalue("update") or ""
|
||||
if update == "" then
|
||||
http_write_json_error({ message = "missing update target" })
|
||||
return
|
||||
end
|
||||
luci.sys.call("lua /usr/share/passwall/rule_update.lua log '" .. update .. "' > /dev/null 2>&1 &")
|
||||
http_write_json()
|
||||
end
|
||||
@@ -1111,9 +1115,9 @@ function fetch_certsha256()
|
||||
local address = (id ~= "") and uci:get(appname, id, "address") or ""
|
||||
local port = (id ~= "") and uci:get(appname, id, "port") or 0
|
||||
if id == "" or address == "" or not api.datatypes.hostname(address) or port == 0 then
|
||||
http_write_json({ code = 1 })
|
||||
http_write_json_error()
|
||||
return
|
||||
end
|
||||
local data = api.fetch_cert_sha256(address, port, 5)
|
||||
http_write_json(data ~= "" and { code = 0, data = data } or { code = 1 })
|
||||
http_write_json(data ~= "" and { code = 1, data = data } or { code = 0 })
|
||||
end
|
||||
Reference in new issue
Block a user