diff options
Diffstat (limited to 'applications/luci-app-shadowsocks-libev')
3 files changed, 87 insertions, 46 deletions
diff --git a/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev.lua b/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev.lua index 0b88f5a0fc..76435e2f14 100644 --- a/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev.lua +++ b/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev.lua @@ -9,6 +9,26 @@ else m = Map("shadowsocks-libev", translate("ShadowSocks-libev"), translate("ShadowSocks-libev is not running")) end +e = { + "table", + "rc4", + "rc4-md5", + "aes-128-cfb", + "aes-192-cfb", + "aes-256-cfb", + "bf-cfb", + "camellia-128-cfb", + "camellia-192-cfb", + "camellia-256-cfb", + "cast5-cfb", + "des-cfb", + "idea-cfb", + "rc2-cfb", + "seed-cfb", + "salsa20", + "chacha20", +} + -- Global Setting s = m:section(TypedSection, "shadowsocks-libev", translate("Global Setting")) s.anonymous = true @@ -18,7 +38,7 @@ o.default = 1 o.rmempty = false o = s:option(Value, "server", translate("Server Address")) -o.datatype = "host" +o.datatype = "ipaddr" o.rmempty = false o = s:option(Value, "server_port", translate("Server Port")) @@ -39,47 +59,56 @@ o = s:option(Value, "password", translate("Password")) o.password = true o.rmempty = false -e = { - "table", - "rc4", - "rc4-md5", - "aes-128-cfb", - "aes-192-cfb", - "aes-256-cfb", - "bf-cfb", - "camellia-128-cfb", - "camellia-192-cfb", - "camellia-256-cfb", - "cast5-cfb", - "des-cfb", - "idea-cfb", - "rc2-cfb", - "seed-cfb", - "salsa20", - "chacha20", -} - o = s:option(ListValue, "encrypt_method", translate("Encrypt Method")) for i,v in ipairs(e) do o:value(v) end o.rmempty = false --- Proxy Setting -s = m:section(TypedSection, "shadowsocks-libev", translate("Proxy Setting")) -s.anonymous = true - -o = s:option(ListValue, "udp_relay", translate("Proxy Protocol")) -o:value("0", translate("TCP only")) -o:value("1", translate("TCP+UDP")) -o.default = 1 -o.rmempty = false - o = s:option(Value, "ignore_list", translate("Ignore List")) o:value("/dev/null", translate("Disabled")) o.default = "/dev/null" o.rmempty = false +-- UDP Relay +s = m:section(TypedSection, "shadowsocks-libev", translate("UDP Relay")) +s.anonymous = true + +o = s:option(ListValue, "udp_mode", translate("Relay Mode")) +o:value("0", translate("Disabled")) +o:value("1", translate("Enabled")) +o:value("2", translate("Custom")) +o.default = 0 +o.rmempty = false + +o = s:option(Value, "udp_server", translate("Server Address")) +o.datatype = "ipaddr" +o:depends("udp_mode", 2) + +o = s:option(Value, "udp_server_port", translate("Server Port")) +o.datatype = "port" +o:depends("udp_mode", 2) + +o = s:option(Value, "udp_local_port", translate("Local Port")) +o.datatype = "port" +o.default = 1081 +o:depends("udp_mode", 2) + +o = s:option(Value, "udp_timeout", translate("Connection Timeout")) +o.datatype = "uinteger" +o.default = 60 +o:depends("udp_mode", 2) + +o = s:option(Value, "udp_password", translate("Password")) +o.password = true +o:depends("udp_mode", 2) + +o = s:option(ListValue, "udp_encrypt_method", translate("Encrypt Method")) +for i,v in ipairs(e) do + o:value(v) +end +o:depends("udp_mode", 2) + -- UDP Forward s = m:section(TypedSection, "shadowsocks-libev", translate("UDP Forward")) s.anonymous = true diff --git a/applications/luci-app-shadowsocks-libev/po/templates/shadowsocks-libev.pot b/applications/luci-app-shadowsocks-libev/po/templates/shadowsocks-libev.pot index a02608e1ea..c2bde961e0 100644 --- a/applications/luci-app-shadowsocks-libev/po/templates/shadowsocks-libev.pot +++ b/applications/luci-app-shadowsocks-libev/po/templates/shadowsocks-libev.pot @@ -16,6 +16,15 @@ msgstr "" msgid "Enable" msgstr "" +msgid "Enabled" +msgstr "" + +msgid "Disabled" +msgstr "" + +msgid "Custom" +msgstr "" + msgid "Server Address" msgstr "" @@ -34,13 +43,13 @@ msgstr "" msgid "Encrypt Method" msgstr "" -msgid "Proxy Setting" +msgid "Ignore List" msgstr "" -msgid "Proxy Protocol" +msgid "UDP Relay" msgstr "" -msgid "Ignore List" +msgid "Relay Mode" msgstr "" msgid "UDP Forward" @@ -55,9 +64,6 @@ msgstr "" msgid "Access Control" msgstr "" -msgid "Disabled" -msgstr "" - msgid "Allow listed only" msgstr "" diff --git a/applications/luci-app-shadowsocks-libev/po/zh-cn/shadowsocks-libev.po b/applications/luci-app-shadowsocks-libev/po/zh-cn/shadowsocks-libev.po index 902f7a18a8..90a0eff996 100644 --- a/applications/luci-app-shadowsocks-libev/po/zh-cn/shadowsocks-libev.po +++ b/applications/luci-app-shadowsocks-libev/po/zh-cn/shadowsocks-libev.po @@ -27,6 +27,15 @@ msgstr "全局设置" msgid "Enable" msgstr "启用" +msgid "Enabled" +msgstr "已启用" + +msgid "Disabled" +msgstr "已禁用" + +msgid "Custom" +msgstr "自定义" + msgid "Server Address" msgstr "服务器地址" @@ -45,15 +54,15 @@ msgstr "密码" msgid "Encrypt Method" msgstr "加密方式" -msgid "Proxy Setting" -msgstr "代理设置" - -msgid "Proxy Protocol" -msgstr "代理协议" - msgid "Ignore List" msgstr "忽略列表" +msgid "UDP Relay" +msgstr "UDP中继" + +msgid "Relay Mode" +msgstr "中继模式" + msgid "UDP Forward" msgstr "UDP转发" @@ -66,9 +75,6 @@ msgstr "UDP转发地址" msgid "Access Control" msgstr "访问控制" -msgid "Disabled" -msgstr "已禁用" - msgid "Allow listed only" msgstr "仅允许列表内" |