From e728583a29bb540346db03a1a3578b7a567f28c1 Mon Sep 17 00:00:00 2001
From: xiaorouji <60100640+xiaorouji@users.noreply.github.com>
Date: Thu, 7 Jan 2021 12:12:47 +0800
Subject: [PATCH] luci-app-passwall: sync with upstream source
---
.../luasrc/controller/passwall.lua | 9 ++++----
.../model/cbi/passwall/client/rule_list.lua | 2 --
.../passwall/server/users_list_status.htm | 23 +------------------
.../root/usr/share/passwall/app.sh | 2 +-
.../root/usr/share/passwall/iptables.sh | 4 ++--
.../root/usr/share/passwall/rules/proxy_host | 1 +
6 files changed, 9 insertions(+), 32 deletions(-)
diff --git a/package/lienol/luci-app-passwall/luasrc/controller/passwall.lua b/package/lienol/luci-app-passwall/luasrc/controller/passwall.lua
index e1375137f0..099dd6a054 100644
--- a/package/lienol/luci-app-passwall/luasrc/controller/passwall.lua
+++ b/package/lienol/luci-app-passwall/luasrc/controller/passwall.lua
@@ -340,15 +340,14 @@ function server_user_status()
end
function server_user_log()
- local e = {}
local id = luci.http.formvalue("id")
if nixio.fs.access("/var/etc/passwall_server/" .. id .. ".log") then
- e.code = 200
+ local content = luci.sys.exec("cat /var/etc/passwall_server/" .. id .. ".log")
+ content = content:gsub("\n", "
")
+ luci.http.write(content)
else
- e.code = 400
+ luci.http.write(string.format("", i18n.translate("Not enabled log")))
end
- e.data = luci.sys.exec("cat /var/etc/passwall_server/" .. id .. ".log")
- http_write_json(e)
end
function server_get_log()
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/rule_list.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/rule_list.lua
index d6bb806ea9..20740f458a 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/rule_list.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/rule_list.lua
@@ -12,8 +12,6 @@ s.anonymous = true
s:tab("direct_list", translate("Direct List"))
s:tab("proxy_list", translate("Proxy List"))
-s:tab("proxy_list2", translate("Proxy List") .. " 2")
-s:tab("proxy_list3", translate("Proxy List") .. " 3")
---- Direct Hosts
local direct_host = string.format("/usr/share/%s/rules/direct_host", appname)
diff --git a/package/lienol/luci-app-passwall/luasrc/view/passwall/server/users_list_status.htm b/package/lienol/luci-app-passwall/luasrc/view/passwall/server/users_list_status.htm
index ba5c5a7f9a..15e4f13ce1 100644
--- a/package/lienol/luci-app-passwall/luasrc/view/passwall/server/users_list_status.htm
+++ b/package/lienol/luci-app-passwall/luasrc/view/passwall/server/users_list_status.htm
@@ -1,26 +1,5 @@