diff --git a/luci-app-passwall/luasrc/controller/passwall.lua b/luci-app-passwall/luasrc/controller/passwall.lua
index 29e3604ab..4143d44cd 100644
--- a/luci-app-passwall/luasrc/controller/passwall.lua
+++ b/luci-app-passwall/luasrc/controller/passwall.lua
@@ -79,9 +79,7 @@ function index()
entry({"admin", "services", appname, "update_rules"}, call("update_rules")).leaf = true
--[[rule_list]]
- entry({"admin", "services", appname, "read_gfwlist"}, call("read_rulelist", "gfw")).leaf = true
- entry({"admin", "services", appname, "read_chnlist"}, call("read_rulelist", "chn")).leaf = true
- entry({"admin", "services", appname, "read_chnroute"}, call("read_rulelist", "chnroute")).leaf = true
+ entry({"admin", "services", appname, "read_rulelist"}, call("read_rulelist")).leaf = true
--[[Components update]]
entry({"admin", "services", appname, "check_passwall"}, call("app_check")).leaf = true
@@ -495,14 +493,18 @@ function com_update(comname)
http_write_json(json)
end
-function read_rulelist(list)
+function read_rulelist()
+ local rule_type = http.formvalue("type")
local rule_path
- if list == "gfw" then
+ if rule_type == "gfw" then
rule_path = "/usr/share/passwall/rules/gfwlist"
- elseif list == "chn" then
+ elseif rule_type == "chn" then
rule_path = "/usr/share/passwall/rules/chnlist"
- else
+ elseif rule_type == "chnroute" then
rule_path = "/usr/share/passwall/rules/chnroute"
+ else
+ http.status(400, "Invalid rule type")
+ return
end
if fs.access(rule_path) then
http.prepare_content("text/plain")
diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/log.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/log.lua
index 8abea56c8..6d2033936 100644
--- a/luci-app-passwall/luasrc/model/cbi/passwall/client/log.lua
+++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/log.lua
@@ -12,7 +12,10 @@ f:append(Template(appname .. "/log/log"))
fb = SimpleForm('backup-restore')
fb.reset = false
fb.submit = false
-s = fb:section(SimpleSection, translate("Backup and Restore"), translate("Backup or Restore Client and Server Configurations."))
+s = fb:section(SimpleSection, translate("Backup and Restore"), translate("Backup or Restore Client and Server Configurations.") ..
+ "
" ..
+ translate("Note: Restoring configurations across different versions may cause compatibility issues.") ..
+ "")
o = s:option(DummyValue, '', nil)
o.template = appname .. "/log/backup_restore"
diff --git a/luci-app-passwall/luasrc/view/passwall/rule_list/js.htm b/luci-app-passwall/luasrc/view/passwall/rule_list/js.htm
index 0797d8d5d..63b1fcaff 100644
--- a/luci-app-passwall/luasrc/view/passwall/rule_list/js.htm
+++ b/luci-app-passwall/luasrc/view/passwall/rule_list/js.htm
@@ -6,7 +6,7 @@ local total_lines_text = translate("Total Lines")