Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tbblgm119
lede
提交
25dd6376
L
lede
项目概览
tbblgm119
/
lede
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
lede
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
25dd6376
编写于
2月 20, 2020
作者:
C
coolsnowwolf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
luci-app-ssr-plus: add subscribe auto-switch setting
上级
06f2f568
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
9 deletion
+16
-9
package/lean/luci-app-ssr-plus/Makefile
package/lean/luci-app-ssr-plus/Makefile
+1
-1
package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua
...ci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua
+6
-0
package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po
package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po
+6
-0
package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua
...ci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua
+3
-8
未找到文件。
package/lean/luci-app-ssr-plus/Makefile
浏览文件 @
25dd6376
include
$(TOPDIR)/rules.mk
PKG_NAME
:=
luci-app-ssr-plus
PKG_VERSION
:=
14
7
PKG_VERSION
:=
14
8
PKG_RELEASE
:=
1
PKG_BUILD_DIR
:=
$(BUILD_DIR)
/
$(PKG_NAME)
...
...
package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua
浏览文件 @
25dd6376
...
...
@@ -41,10 +41,16 @@ o.write = function()
luci
.
http
.
redirect
(
luci
.
dispatcher
.
build_url
(
"admin"
,
"services"
,
"shadowsocksr"
,
"servers"
))
end
o
=
s
:
option
(
Flag
,
"switch"
,
translate
(
"Subscribe Default Auto-Switch"
))
o
.
rmempty
=
false
o
.
description
=
translate
(
"Subscribe new add server default Auto-Switch on"
)
o
.
default
=
"1"
o
=
s
:
option
(
Flag
,
"proxy"
,
translate
(
"Through proxy update"
))
o
.
rmempty
=
false
o
.
description
=
translate
(
"Through proxy update list, Not Recommended "
)
o
=
s
:
option
(
Button
,
"subscribe"
,
translate
(
"Update All Subscribe Severs"
))
o
.
rawhtml
=
true
o
.
template
=
"shadowsocksr/subscribe"
...
...
package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po
浏览文件 @
25dd6376
...
...
@@ -570,3 +570,9 @@ msgstr "当前证书路径"
msgid "Please confirm the current certificate path"
msgstr "请选择确认所传证书,证书不正确将无法运行"
msgid "Subscribe Default Auto-Switch"
msgstr "订阅新节点自动切换设置"
msgid "Subscribe new add server default Auto-Switch on"
msgstr "订阅加入的新节点默认开启自动切换"
package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua
浏览文件 @
25dd6376
...
...
@@ -21,6 +21,7 @@ local name = 'shadowsocksr'
local
uciType
=
'servers'
local
ucic
=
luci
.
model
.
uci
.
cursor
()
local
proxy
=
ucic
:
get_first
(
name
,
'server_subscribe'
,
'proxy'
,
'0'
)
local
switch
=
ucic
:
get_first
(
name
,
'server_subscribe'
,
'switch'
,
'1'
)
local
subscribe_url
=
ucic
:
get_first
(
name
,
'server_subscribe'
,
'subscribe_url'
,
{})
local
log
=
function
(
...
)
...
...
@@ -337,19 +338,14 @@ local execute = function()
log
(
'忽略手动添加的节点: '
..
old
.
alias
)
end
-- 保留原有节点的自动切换设置
if
(
old
.
switch_enable
)
then
nodeResult
.
switch_enable
=
old
.
switch_enable
end
end
)
for
k
,
v
in
ipairs
(
nodeResult
)
do
for
kk
,
vv
in
ipairs
(
v
)
do
if
not
vv
.
_ignore
then
local
section
=
ucic
:
add
(
name
,
uciType
)
ucic
:
tset
(
name
,
section
,
vv
)
ucic
:
set
(
name
,
section
,
"switch_enable"
,
switch
)
add
=
add
+
1
end
...
...
@@ -389,4 +385,3 @@ if subscribe_url and #subscribe_url > 0 then
end
end
)
end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录