diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2017-07-23 19:37:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-23 19:37:10 +0300 |
commit | 8f62b28948f8b24f1eb8239074a19d868a02cad6 (patch) | |
tree | 9f75453fedbb838374d8c52ae0b2f651b2185f78 /applications/luci-app-shadowsocks-libev/luasrc/controller | |
parent | 52a0787c3fd6ad066e98f3d81849c413d8ea3bd4 (diff) | |
parent | 48b5ccfad54d6d21468f68a2ae8c52c377bc5c5e (diff) |
Merge pull request #1242 from yousong/shadowsocks-libev
luci-app-shadowsocks-libev: rewrite for shadowsocks-libev 3.0.6-2
Diffstat (limited to 'applications/luci-app-shadowsocks-libev/luasrc/controller')
-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 |