luci-app-ssr-plus: sync upstream

last commit: dbb63e6497
This commit is contained in:
gitea-action 2024-11-09 17:34:12 +08:00
parent b8081d58ba
commit 47b92e29ba
5 changed files with 62 additions and 8 deletions

View File

@ -19,12 +19,34 @@ o = s:option(Flag, "auto_update", translate("Auto Update"))
o.rmempty = false o.rmempty = false
o.description = translate("Auto Update Server subscription, GFW list and CHN route") o.description = translate("Auto Update Server subscription, GFW list and CHN route")
o = s:option(ListValue, "auto_update_time", translate("Update time (every day)")) o = s:option(ListValue, "auto_update_week_time", translate("Update Time (Every Week)"))
o:value('*', translate("Every Day"))
o:value("1", translate("Every Monday"))
o:value("2", translate("Every Tuesday"))
o:value("3", translate("Every Wednesday"))
o:value("4", translate("Every Thursday"))
o:value("5", translate("Every Friday"))
o:value("6", translate("Every Saturday"))
o:value("0", translate("Every Sunday"))
o.default = "*"
o.rmempty = false
o:depends("auto_update", "1")
o = s:option(ListValue, "auto_update_day_time", translate("Update time (every day)"))
for t = 0, 23 do for t = 0, 23 do
o:value(t, t .. ":00") o:value(t, t .. ":00")
end end
o.default = 2 o.default = 2
o.rmempty = false o.rmempty = false
o:depends("auto_update", "1")
o = s:option(ListValue, "auto_update_min_time", translate("Update Interval (min)"))
for i = 0, 59 do
o:value(i, i .. ":00")
end
o.default = 30
o.rmempty = false
o:depends("auto_update", "1")
o = s:option(DynamicList, "subscribe_url", translate("Subscribe URL")) o = s:option(DynamicList, "subscribe_url", translate("Subscribe URL"))
o.rmempty = true o.rmempty = true

View File

@ -575,6 +575,36 @@ msgstr "格式为 IP:PORT默认禁用"
msgid "Update time (every day)" msgid "Update time (every day)"
msgstr "更新时间(每天)" msgstr "更新时间(每天)"
msgid "Update Time (Every Week)"
msgstr "更新时间(每周)"
msgid "Update Interval (min)"
msgstr "更新间隔 (分钟)"
msgid "Every Day"
msgstr "每天"
msgid "Every Monday"
msgstr "每周一"
msgid "Every Tuesday"
msgstr "每周二"
msgid "Every Wednesday"
msgstr "每周三"
msgid "Every Thursday"
msgstr "每周四"
msgid "Every Friday"
msgstr "每周五"
msgid "Every Saturday"
msgstr "每周六"
msgid "Every Sunday"
msgstr "每周日"
msgid "Auto Update Server subscription, GFW list and CHN route" msgid "Auto Update Server subscription, GFW list and CHN route"
msgstr "自动更新服务器订阅、GFW 列表和中国大陆 IP 段" msgstr "自动更新服务器订阅、GFW 列表和中国大陆 IP 段"

View File

@ -61,12 +61,12 @@ PS="/bin/busybox ps"
uci_get_by_name() { uci_get_by_name() {
local ret=$(uci get $NAME.$1.$2 2>/dev/null) local ret=$(uci get $NAME.$1.$2 2>/dev/null)
echo ${ret:=$3} echo "${ret:=$3}"
} }
uci_get_by_type() { uci_get_by_type() {
local ret=$(uci get $NAME.@$1[0].$2 2>/dev/null) local ret=$(uci get $NAME.@$1[0].$2 2>/dev/null)
echo ${ret:=$3} echo "${ret:=$3}"
} }
uci_set_by_name() { uci_set_by_name() {
@ -81,7 +81,7 @@ uci_set_by_type() {
uci_get_by_cfgid() { uci_get_by_cfgid() {
local ret=$(uci show $NAME.@$1[0].$2 | awk -F '.' '{print $2}' 2>/dev/null) local ret=$(uci show $NAME.@$1[0].$2 | awk -F '.' '{print $2}' 2>/dev/null)
echo ${ret:=$3} echo "${ret:=$3}"
} }
get_host_ip() { get_host_ip() {
@ -120,7 +120,7 @@ echolog() {
add_cron() { add_cron() {
touch $CRON_FILE touch $CRON_FILE
sed -i '/ssrplus.log/d' $CRON_FILE sed -i '/ssrplus.log/d' $CRON_FILE
[ $(uci_get_by_type server_subscribe auto_update 0) -eq 1 ] && echo "0 $(uci_get_by_type server_subscribe auto_update_time) * * * /usr/share/shadowsocksr/ssrplusupdate.sh >$LOG_FILE" >>$CRON_FILE [ $(uci_get_by_type server_subscribe auto_update 0) -eq 1 ] && echo "$(uci_get_by_type server_subscribe auto_update_min_time) $(uci_get_by_type server_subscribe auto_update_day_time) * * $(uci_get_by_type server_subscribe auto_update_week_time) /usr/share/shadowsocksr/ssrplusupdate.sh >$LOG_FILE" >>$CRON_FILE
crontab $CRON_FILE crontab $CRON_FILE
} }

View File

@ -22,8 +22,10 @@ config global
config server_subscribe config server_subscribe
option proxy '0' option proxy '0'
option auto_update_time '2'
option auto_update '1' option auto_update '1'
option auto_update_week_time '*'
option auto_update_day_time '2'
option auto_update_min_time '0'
option filter_words '过期时间/剩余流量/QQ群/官网/防失联地址/回国' option filter_words '过期时间/剩余流量/QQ群/官网/防失联地址/回国'
config access_control config access_control

View File

@ -430,7 +430,7 @@ index c81590e..18dcdf2 100644
} }
} }
diff --git a/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po b/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po diff --git a/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po b/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po
index 18f19a7..307725e 100644 index db33689..68c2940 100644
--- a/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po --- a/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po
+++ b/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po +++ b/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po
@@ -557,27 +557,6 @@ msgstr "使用 DNS2TCP 查询" @@ -557,27 +557,6 @@ msgstr "使用 DNS2TCP 查询"
@ -462,7 +462,7 @@ index 18f19a7..307725e 100644
msgstr "DNS 服务器 IP:Port" msgstr "DNS 服务器 IP:Port"
diff --git a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr diff --git a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
index 4029a07..93388ce 100755 index b212b90..a5a2809 100755
--- a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr --- a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
+++ b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
@@ -185,23 +185,17 @@ ln_start_bin() { @@ -185,23 +185,17 @@ ln_start_bin() {