diff --git a/files/luci/i18n/shadowsocks.zh-cn.lmo b/files/luci/i18n/shadowsocks.zh-cn.lmo index 500ba44..c697069 100644 Binary files a/files/luci/i18n/shadowsocks.zh-cn.lmo and b/files/luci/i18n/shadowsocks.zh-cn.lmo differ diff --git a/files/luci/i18n/shadowsocks.zh-cn.po b/files/luci/i18n/shadowsocks.zh-cn.po index d7ae6c1..b1997df 100644 --- a/files/luci/i18n/shadowsocks.zh-cn.po +++ b/files/luci/i18n/shadowsocks.zh-cn.po @@ -4,17 +4,29 @@ msgstr "Content-Type: text/plain; charset=UTF-8\n" msgid "ShadowSocks" msgstr "ShadowSocks" +msgid "A lightweight secured SOCKS5 proxy" +msgstr "一个轻量级安全SOCKS5代理" + msgid "Enable" msgstr "启用" msgid "Disable" msgstr "停用" -msgid "ShadowSocks is running" -msgstr "ShadowSocks 运行中" +msgid "Running Status" +msgstr "运行状态" + +msgid "Transparent Proxy" +msgstr "透明代理" + +msgid "UDP Forward" +msgstr "UDP转发" -msgid "ShadowSocks is not running" -msgstr "ShadowSocks 未运行" +msgid "RUNNING" +msgstr "运行中" + +msgid "NOT RUNNING" +msgstr "未运行" msgid "Global Setting" msgstr "全局设置" @@ -25,8 +37,8 @@ msgstr "全局服务器" msgid "Disable ShadowSocks" msgstr "停用ShadowSocks" -msgid "UDP Relay Server" -msgstr "UDP中继服务器" +msgid "UDP-Relay Server" +msgstr "UDP服务器" msgid "Same as Global Server" msgstr "与全局服务器相同" @@ -58,9 +70,6 @@ msgstr "密码" msgid "Encrypt Method" msgstr "加密方式" -msgid "UDP Forward" -msgstr "UDP转发" - msgid "UDP Local Port" msgstr "UDP本地端口" diff --git a/files/luci/model/cbi/shadowsocks.lua b/files/luci/model/cbi/shadowsocks.lua index 0be6554..b2b2fe3 100644 --- a/files/luci/model/cbi/shadowsocks.lua +++ b/files/luci/model/cbi/shadowsocks.lua @@ -7,12 +7,6 @@ local shadowsocks = "shadowsocks" local uci = luci.model.uci.cursor() local ipkg = require("luci.model.ipkg") -if luci.sys.call("pidof ss-redir >/dev/null") == 0 then - m = Map(shadowsocks, translate("ShadowSocks"), translate("ShadowSocks is running")) -else - m = Map(shadowsocks, translate("ShadowSocks"), translate("ShadowSocks is not running")) -end - local chnroute = uci:get_first("chinadns", "chinadns", "chnroute") local server_table = {} local arp_table = luci.sys.net.arptable() or {} @@ -49,6 +43,26 @@ uci:foreach(shadowsocks, "servers", function(s) end end) +m = Map(shadowsocks, translate("ShadowSocks"), translate("A lightweight secured SOCKS5 proxy")) + +-- [[ Running Status ]]-- +s = m:section(TypedSection, "global", translate("Running Status")) +s.anonymous = true + +o = s:option(DummyValue, "_status", translate("Transparent Proxy")) +if luci.sys.call("pidof ss-redir >/dev/null") == 0 then + o.value = translate("RUNNING") +else + o.value = translate("NOT RUNNING") +end + +o = s:option(DummyValue, "_status", translate("UDP Forward")) +if luci.sys.call("pidof ss-tunnel >/dev/null") == 0 then + o.value = translate("RUNNING") +else + o.value = translate("NOT RUNNING") +end + -- [[ Global Setting ]]-- s = m:section(TypedSection, "global", translate("Global Setting")) s.anonymous = true @@ -59,7 +73,7 @@ for k, v in pairs(server_table) do o:value(k, v) end o.default = "nil" o.rmempty = false -o = s:option(ListValue, "udp_relay_server", translate("UDP Relay Server")) +o = s:option(ListValue, "udp_relay_server", translate("UDP-Relay Server")) o:value("", translate("Disable")) o:value("same", translate("Same as Global Server")) for k, v in pairs(server_table) do o:value(k, v) end