diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2017-07-09 03:18:15 +0800 |
---|---|---|
committer | Yousong Zhou <yszhou4tech@gmail.com> | 2017-07-23 23:40:26 +0800 |
commit | 48b5ccfad54d6d21468f68a2ae8c52c377bc5c5e (patch) | |
tree | c5dd2a8fdcee0a4fe3c1dc49d0929a9a12b70678 /applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua | |
parent | 90de442347a54400d37ddb36ecb7a99e913d026a (diff) |
luci-app-shadowsocks-libev: rewrite for shadowsocks-libev 3.0.6-2
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua')
-rw-r--r-- | applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua b/applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua index ae968168f1..e191e59bb1 100644 --- a/applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua +++ b/applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua @@ -1,12 +1,22 @@ --- Copyright 2015 Jian Chang <aa65535@live.com> +-- Copyright 2017 Yousong Zhou <yszhou4tech@gmail.com> -- Licensed to the public under the Apache License 2.0. - +-- module("luci.controller.shadowsocks-libev", package.seeall) function index() - if not nixio.fs.access("/etc/config/shadowsocks-libev") then - return - end + entry({"admin", "services", "shadowsocks-libev"}, + alias("admin", "services", "shadowsocks-libev", "instances"), + _("Shadowsocks-libev"), 59) + + entry({"admin", "services", "shadowsocks-libev", "instances"}, + arcombine(cbi("shadowsocks-libev/instances"), cbi("shadowsocks-libev/instance-details")), + _("Local Instances"), 10).leaf = true + + entry({"admin", "services", "shadowsocks-libev", "servers"}, + cbi("shadowsocks-libev/servers"), + _("Remote Servers"), 20).leaf = true - entry({"admin", "services", "shadowsocks-libev"}, cbi("shadowsocks-libev"), _("ShadowSocks-libev"), 74).dependent = true + entry({"admin", "services", "shadowsocks-libev", "rules"}, + cbi("shadowsocks-libev/rules"), + _("Redir Rules"), 30).leaf = true end |