diff --git a/luci-app-alist/Makefile b/luci-app-alist/Makefile index 220b3fc..8779d63 100644 --- a/luci-app-alist/Makefile +++ b/luci-app-alist/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-alist -PKG_VERSION:=1.0.7 +PKG_VERSION:=1.0.8 PKG_RELEASE:=1 LUCI_TITLE:=LuCI support for alist diff --git a/luci-app-alist/luasrc/model/cbi/alist/basic.lua b/luci-app-alist/luasrc/model/cbi/alist/basic.lua index 3914288..93a65b9 100644 --- a/luci-app-alist/luasrc/model/cbi/alist/basic.lua +++ b/luci-app-alist/luasrc/model/cbi/alist/basic.lua @@ -33,6 +33,11 @@ o:depends("ssl", "1") o = s:option(Flag, "allow_wan", translate("Allow Access From Internet")) o.rmempty = false +o = s:option(Value, "max_connections", translate("Max Connections"), translate("0 is unlimited, It is recommend to set a low number of concurrency (10-20) for poor performance device")) +o.datatype = "and(uinteger,min(0))" +o.default = "0" +o.rmempty = false + o = s:option(Value, "token_expires_in", translate("Login Validity Period (hours)")) o.datatype = "and(uinteger,min(0))" o.default = "48" diff --git a/luci-app-alist/po/zh-cn/alist.po b/luci-app-alist/po/zh-cn/alist.po index fd3578a..3f770f2 100644 --- a/luci-app-alist/po/zh-cn/alist.po +++ b/luci-app-alist/po/zh-cn/alist.po @@ -75,3 +75,9 @@ msgstr "读取" msgid "Login Validity Period (hours)" msgstr "登录有效期(小时)" + +msgid "Max Connections" +msgstr "最大并发连接数" + +msgid "0 is unlimited, It is recommend to set a low number of concurrency (10-20) for poor performance device" +msgstr "默认0不限制,低性能设备建议设置较低的并发数(10-20)" diff --git a/luci-app-alist/root/etc/config/alist b/luci-app-alist/root/etc/config/alist index e47fae6..b717104 100644 --- a/luci-app-alist/root/etc/config/alist +++ b/luci-app-alist/root/etc/config/alist @@ -4,3 +4,4 @@ config alist option 'temp_dir' '/tmp/alist' option 'ssl' '0' option 'token_expires_in' '48' + option 'max_connections' '0' diff --git a/luci-app-alist/root/etc/init.d/alist b/luci-app-alist/root/etc/init.d/alist index 736a001..2a8deb9 100755 --- a/luci-app-alist/root/etc/init.d/alist +++ b/luci-app-alist/root/etc/init.d/alist @@ -15,6 +15,7 @@ get_config() { config_get ssl_key $1 ssl_key "" config_get token_expires_in $1 token_expires_in 48 config_get allow_wan $1 allow_wan 0 + config_get max_connections $1 max_connections 0 config_load network config_get lan_addr lan ipaddr "0.0.0.0" if echo "${lan_addr}" | grep -Fq ' '; then @@ -60,7 +61,7 @@ start_service() { set_firewall cat /dev/null > $temp_dir/alist.log cat > $CONFIG_DIR/config.json <