diff options
Diffstat (limited to 'applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua')
-rw-r--r-- | applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua b/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua index 6608ee8d35..650ff6356e 100644 --- a/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua +++ b/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua @@ -14,8 +14,10 @@ module("luci.model.shadowsocks-libev", function(m) end) function values_actions(o) - for _, a in ipairs(actions) do - o:value(a) + o:value("bypass") + o:value("forward") + if o.option ~= "dst_default" then + o:value("checkdst") end end @@ -43,7 +45,6 @@ function values_serverlist(o) end function values_ipaddr(o) - local keys, vals = {}, {} for _, v in ipairs(nw:get_interfaces()) do for _, a in ipairs(v:ipaddrs()) do o:value(a:host():string(), '%s (%s)' %{ a:host(), v:shortname() }) @@ -51,6 +52,14 @@ function values_ipaddr(o) end end +function values_ifnames(o) + for _, v in ipairs(nw:get_interfaces()) do + if v.dev then + o:value(v.dev.name) + end + end +end + function options_client(s, tab) local o @@ -226,17 +235,13 @@ modes = { "udp_only", } -actions = { - "bypass", - "forward", - "checkdst", -} - methods = { -- aead "aes-128-gcm", "aes-192-gcm", "aes-256-gcm", + "chacha20-ietf-poly1305", + "xchacha20-ietf-poly1305", -- stream "table", "rc4", |