diff --git a/alist/Makefile b/alist/Makefile index f105d063b..ce246abf4 100644 --- a/alist/Makefile +++ b/alist/Makefile @@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=alist -PKG_VERSION:=3.40.0 -PKG_WEB_VERSION:=3.39.2 +PKG_VERSION:=3.41.0 +PKG_WEB_VERSION:=3.41.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/alist-org/alist/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=350f6d0610cebb70c645e52a87aaf0e8cb5bb275593ee22778ed8348da48b005 +PKG_HASH:=0336a1c0089d558e7e3efd0337e51e9c45bc80f22ee8a71103e12417a7d647a2 PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILE:=LICENSE @@ -23,7 +23,7 @@ define Download/$(PKG_NAME)-web FILE:=$(PKG_NAME)-web-$(PKG_WEB_VERSION).tar.gz URL_FILE:=dist.tar.gz URL:=https://github.com/alist-org/alist-web/releases/download/$(PKG_WEB_VERSION)/ - HASH:=d998315aff5544e7d7248214d02a3b04a92366bf0ac50fb4791b23833e8b543a + HASH:=7fbc3e83874fca15eb6590aad2c09cd6eb4f15aa7febe2b25a961ea56ba5265b endef PKG_BUILD_DEPENDS:=golang/host diff --git a/luci-app-passwall/luasrc/controller/passwall.lua b/luci-app-passwall/luasrc/controller/passwall.lua index ce89a3749..02ce26cae 100644 --- a/luci-app-passwall/luasrc/controller/passwall.lua +++ b/luci-app-passwall/luasrc/controller/passwall.lua @@ -77,6 +77,11 @@ function index() entry({"admin", "services", appname, "delete_select_nodes"}, call("delete_select_nodes")).leaf = true 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 + --[[Components update]] entry({"admin", "services", appname, "check_passwall"}, call("app_check")).leaf = true local coms = require "luci.passwall.com" @@ -475,3 +480,19 @@ function com_update(comname) http_write_json(json) end + +function read_rulelist(list) + local rule_path + if list == "gfw" then + rule_path = "/usr/share/passwall/rules/gfwlist" + elseif list == "chn" then + rule_path = "/usr/share/passwall/rules/chnlist" + else + rule_path = "/usr/share/passwall/rules/chnroute" + end + if api.fs.access(rule_path) then + luci.http.prepare_content("text/plain") + luci.http.write(api.fs.readfile(rule_path)) + end +end + diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/rule_list.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/rule_list.lua index 27e863a15..5c9abb15b 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/rule_list.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/rule_list.lua @@ -273,71 +273,41 @@ end if api.fs.access(gfwlist_path) then s:tab("gfw_list", translate("GFW List")) - o = s:taboption("gfw_list", TextValue, "gfw_list", "") - o.readonly = true - o.rows = 45 - o.wrap = "off" - o.cfgvalue = function(self, section) - local limit = 100 -- 限制行数 - local cmd = string.format("head -n %d %s", limit, gfwlist_path) - return api.sys.exec(cmd) or "" - -- return fs.readfile(gfwlist_path) or "" - end - local total_lines_cmd = string.format("wc -l < %s", gfwlist_path) - local total_lines = tonumber(api.sys.exec(total_lines_cmd)) or 0 - local displayed_lines = 100 - - local total_lines_label = s:taboption("gfw_list", DummyValue, "total_lines", translate("Total Lines")) - total_lines_label.value = translatef("%d lines", total_lines) - - local displayed_lines_label = s:taboption("gfw_list", DummyValue, "displayed_lines", translate("Displayed Lines")) - displayed_lines_label.value = translatef("%d lines", displayed_lines) + o = s:taboption("gfw_list", DummyValue, "_gfw_fieldset") + o.rawhtml = true + o.default = string.format([[ +