Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tbblgm119
lede
提交
50733cf0
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,发现更多精彩内容 >>
提交
50733cf0
编写于
10月 21, 2019
作者:
L
LEAN-ESX
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
luci-app-ssr-plus: update subscription UI
上级
858d11eb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
10 deletion
+33
-10
package/lean/luci-app-ssr-plus/Makefile
package/lean/luci-app-ssr-plus/Makefile
+1
-1
package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua
...lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua
+2
-1
package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua
...ci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua
+17
-4
package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po
package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po
+11
-2
package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
+2
-2
未找到文件。
package/lean/luci-app-ssr-plus/Makefile
浏览文件 @
50733cf0
...
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
...
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME
:=
luci-app-ssr-plus
PKG_NAME
:=
luci-app-ssr-plus
PKG_VERSION
:=
1
PKG_VERSION
:=
1
PKG_RELEASE
:=
12
0
PKG_RELEASE
:=
12
1
PKG_CONFIG_DEPENDS
:=
CONFIG_PACKAGE_
$(PKG_NAME)
_INCLUDE_Shadowsocks
\
PKG_CONFIG_DEPENDS
:=
CONFIG_PACKAGE_
$(PKG_NAME)
_INCLUDE_Shadowsocks
\
CONFIG_PACKAGE_
$(PKG_NAME)
_INCLUDE_V2ray
\
CONFIG_PACKAGE_
$(PKG_NAME)
_INCLUDE_V2ray
\
...
...
package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua
浏览文件 @
50733cf0
...
@@ -13,7 +13,8 @@ function index()
...
@@ -13,7 +13,8 @@ function index()
entry
({
"admin"
,
"services"
,
"shadowsocksr"
,
"client"
},
cbi
(
"shadowsocksr/client"
),
_
(
"SSR Client"
),
10
).
leaf
=
true
entry
({
"admin"
,
"services"
,
"shadowsocksr"
,
"client"
},
cbi
(
"shadowsocksr/client"
),
_
(
"SSR Client"
),
10
).
leaf
=
true
entry
({
"admin"
,
"services"
,
"shadowsocksr"
,
"servers"
},
arcombine
(
cbi
(
"shadowsocksr/servers"
),
cbi
(
"shadowsocksr/client-config"
)),
_
(
"Severs Nodes"
),
20
).
leaf
=
true
entry
({
"admin"
,
"services"
,
"shadowsocksr"
,
"servers"
},
arcombine
(
cbi
(
"shadowsocksr/servers"
,
{
autoapply
=
true
}),
cbi
(
"shadowsocksr/client-config"
)),
_
(
"Severs Nodes"
),
20
).
leaf
=
true
entry
({
"admin"
,
"services"
,
"shadowsocksr"
,
"control"
},
cbi
(
"shadowsocksr/control"
),
_
(
"Access Control"
),
30
).
leaf
=
true
entry
({
"admin"
,
"services"
,
"shadowsocksr"
,
"control"
},
cbi
(
"shadowsocksr/control"
),
_
(
"Access Control"
),
30
).
leaf
=
true
...
...
package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua
浏览文件 @
50733cf0
...
@@ -9,6 +9,9 @@ uci:foreach("shadowsocksr", "servers", function(s)
...
@@ -9,6 +9,9 @@ uci:foreach("shadowsocksr", "servers", function(s)
server_count
=
server_count
+
1
server_count
=
server_count
+
1
end
)
end
)
local
fs
=
require
"nixio.fs"
local
sys
=
require
"luci.sys"
m
=
Map
(
shadowsocksr
,
translate
(
"Servers subscription and manage"
))
m
=
Map
(
shadowsocksr
,
translate
(
"Servers subscription and manage"
))
-- Server Subscribe
-- Server Subscribe
...
@@ -31,17 +34,25 @@ o.rmempty = false
...
@@ -31,17 +34,25 @@ o.rmempty = false
o
=
s
:
option
(
DynamicList
,
"subscribe_url"
,
translate
(
"Subscribe URL"
))
o
=
s
:
option
(
DynamicList
,
"subscribe_url"
,
translate
(
"Subscribe URL"
))
o
.
rmempty
=
true
o
.
rmempty
=
true
o
=
s
:
option
(
Button
,
"update_Sub"
,
translate
(
"Update Subscribe List"
))
o
.
inputstyle
=
"reload"
o
.
description
=
translate
(
"Update subscribe url list first"
)
o
.
write
=
function
()
luci
.
http
.
redirect
(
luci
.
dispatcher
.
build_url
(
"admin"
,
"services"
,
"shadowsocksr"
,
"servers"
))
end
o
=
s
:
option
(
Flag
,
"proxy"
,
translate
(
"Through proxy update"
))
o
=
s
:
option
(
Flag
,
"proxy"
,
translate
(
"Through proxy update"
))
o
.
rmempty
=
false
o
.
rmempty
=
false
o
.
description
=
translate
(
"Through proxy update list, Not Recommended "
)
o
.
description
=
translate
(
"Through proxy update list, Not Recommended "
)
o
=
s
:
option
(
Button
,
"update"
,
translate
(
"Update"
))
o
=
s
:
option
(
Button
,
"update"
,
translate
(
"Update
All Subscribe Severs
"
))
o
.
inputstyle
=
"
reload
"
o
.
inputstyle
=
"
apply
"
o
.
write
=
function
()
o
.
write
=
function
()
luci
.
sys
.
call
(
"bash /usr/share/shadowsocksr/subscribe.sh >>/tmp/ssrplus.log 2>&1"
)
luci
.
sys
.
exec
(
"bash /usr/share/shadowsocksr/subscribe.sh >>/tmp/ssrplus.log 2>&1"
)
luci
.
http
.
redirect
(
luci
.
dispatcher
.
build_url
(
"admin"
,
"services"
,
"shadowsocksr"
,
"servers"
))
luci
.
http
.
redirect
(
luci
.
dispatcher
.
build_url
(
"admin"
,
"services"
,
"shadowsocksr"
,
"servers"
))
end
end
o
=
s
:
option
(
Button
,
"delete"
,
translate
(
"Delete all severs"
))
o
=
s
:
option
(
Button
,
"delete"
,
translate
(
"Delete all severs"
))
o
.
inputstyle
=
"reset"
o
.
inputstyle
=
"reset"
o
.
description
=
string.format
(
translate
(
"Server Count"
)
..
": %d"
,
server_count
)
o
.
description
=
string.format
(
translate
(
"Server Count"
)
..
": %d"
,
server_count
)
...
@@ -50,6 +61,7 @@ o.write = function()
...
@@ -50,6 +61,7 @@ o.write = function()
uci
:
save
(
"shadowsocksr"
)
uci
:
save
(
"shadowsocksr"
)
luci
.
sys
.
call
(
"uci commit shadowsocksr && /etc/init.d/shadowsocksr stop"
)
luci
.
sys
.
call
(
"uci commit shadowsocksr && /etc/init.d/shadowsocksr stop"
)
luci
.
http
.
redirect
(
luci
.
dispatcher
.
build_url
(
"admin"
,
"services"
,
"shadowsocksr"
,
"servers"
))
luci
.
http
.
redirect
(
luci
.
dispatcher
.
build_url
(
"admin"
,
"services"
,
"shadowsocksr"
,
"servers"
))
return
end
end
-- [[ Servers Manage ]]--
-- [[ Servers Manage ]]--
...
@@ -106,4 +118,5 @@ o.template="shadowsocksr/ping"
...
@@ -106,4 +118,5 @@ o.template="shadowsocksr/ping"
o
.
width
=
"10%"
o
.
width
=
"10%"
m
:
append
(
Template
(
"shadowsocksr/server_list"
))
m
:
append
(
Template
(
"shadowsocksr/server_list"
))
return
m
return
m
package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po
浏览文件 @
50733cf0
...
@@ -450,7 +450,7 @@ msgid "Servers subscription and manage"
...
@@ -450,7 +450,7 @@ msgid "Servers subscription and manage"
msgstr "服务器节点订阅与管理(支持订阅和手动导入SSR链接)"
msgstr "服务器节点订阅与管理(支持订阅和手动导入SSR链接)"
msgid "Through proxy update list, Not Recommended"
msgid "Through proxy update list, Not Recommended"
msgstr "通过路由器自身代理更新订阅
(不推荐)
"
msgstr "通过路由器自身代理更新订阅"
msgid "LAN IP AC"
msgid "LAN IP AC"
msgstr "LAN IP访问控制"
msgstr "LAN IP访问控制"
...
@@ -465,7 +465,7 @@ msgid "Server failsafe auto swith settings"
...
@@ -465,7 +465,7 @@ msgid "Server failsafe auto swith settings"
msgstr "服务器节点故障自动切换设置"
msgstr "服务器节点故障自动切换设置"
msgid "Delete all severs"
msgid "Delete all severs"
msgstr "删除所有服务器"
msgstr "删除所有服务器
节点
"
msgid "Severs Nodes"
msgid "Severs Nodes"
msgstr "服务器节点"
msgstr "服务器节点"
...
@@ -517,3 +517,12 @@ msgstr "域名白名单"
...
@@ -517,3 +517,12 @@ msgstr "域名白名单"
msgid "Black Domain List"
msgid "Black Domain List"
msgstr "域名黑名单"
msgstr "域名黑名单"
msgid "Update Subscribe List"
msgstr "更新订阅URL列表"
msgid "Update subscribe url list first"
msgstr "订阅服务器节点前,请先更新订阅URL列表"
msgid "Update All Subscribe Severs"
msgstr "更新所有订阅服务器节点"
package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
浏览文件 @
50733cf0
...
@@ -44,10 +44,10 @@ uci_get_by_type() {
...
@@ -44,10 +44,10 @@ uci_get_by_type() {
add_cron
()
add_cron
()
{
{
sed
-i
'/ssrplus.log/d'
$CRON_FILE
sed
-i
'/ssrplus.log/d'
$CRON_FILE
echo
'0 1 * *
0
echo "" > /tmp/ssrplus.log'
>>
$CRON_FILE
echo
'0 1 * *
*
echo "" > /tmp/ssrplus.log'
>>
$CRON_FILE
[
-n
"
$(
grep
-w
"/usr/share/shadowsocksr/subscribe.sh"
$CRON_FILE
)
"
]
&&
sed
-i
'/\/usr\/share\/shadowsocksr\/subscribe.sh/d'
$CRON_FILE
[
-n
"
$(
grep
-w
"/usr/share/shadowsocksr/subscribe.sh"
$CRON_FILE
)
"
]
&&
sed
-i
'/\/usr\/share\/shadowsocksr\/subscribe.sh/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/subscribe.sh"
>>
$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/subscribe.sh"
>>
$CRON_FILE
[
-z
"
$(
grep
-w
"/usr/share/shadowsocksr/update.sh"
$CRON_FILE
)
"
]
&&
echo
"0 5 * *
0
/usr/share/shadowsocksr/update.sh"
>>
$CRON_FILE
[
-z
"
$(
grep
-w
"/usr/share/shadowsocksr/update.sh"
$CRON_FILE
)
"
]
&&
echo
"0 5 * *
*
/usr/share/shadowsocksr/update.sh"
>>
$CRON_FILE
crontab
$CRON_FILE
crontab
$CRON_FILE
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录