Skip to content

Commit

Permalink
luci-app-shadowsocks-spec: update && bump
Browse files Browse the repository at this point in the history
support v2.4.8-2
  • Loading branch information
aa65535 committed Jul 27, 2016
1 parent cc80074 commit e69005c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=openwrt-dist-luci
PKG_VERSION:=1.4.0
PKG_VERSION:=1.5.0
PKG_RELEASE:=1

PKG_LICENSE:=GPLv3
Expand Down
21 changes: 15 additions & 6 deletions files/luci/i18n/shadowsocks.zh-cn.po
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ msgstr "仅允许列表外"
msgid "Allow listed only"
msgstr "仅允许列表内"

msgid "Bypassed"
msgstr "绕过"

msgid "Bypassed IP List"
msgstr "被忽略IP列表"

Expand All @@ -28,6 +31,9 @@ msgstr "ChinaDNS路由表"
msgid "Connection Timeout"
msgstr "连接超时"

msgid "Default Action"
msgstr "默认行为"

msgid "Disable ShadowSocks"
msgstr "停用ShadowSocks"

Expand All @@ -46,27 +52,30 @@ msgstr "强制走代理IP"
msgid "Forwarding Tunnel"
msgstr "UDP转发地址"

msgid "Global"
msgstr "全局"

msgid "Global Server"
msgstr "全局服务器"

msgid "Global Setting"
msgstr "全局设置"

msgid "Hosts Action"
msgstr "主机行为"

msgid "Interfaces - LAN"
msgstr "接口 - LAN"

msgid "Interfaces - WAN"
msgstr "接口 - WAN"

msgid "LAN Access Control"
msgstr "内网访问控制"

msgid "LAN Host List"
msgstr "内网主机列表"

msgid "Local Port"
msgstr "本地端口"

msgid "Normal"
msgstr "常规"

msgid "NOT RUNNING"
msgstr "未运行"

Expand Down
27 changes: 18 additions & 9 deletions files/luci/model/cbi/shadowsocks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ openwrt-dist-luci: ShadowSocks
]]--

local pkg_name
local min_version = "2.4.4-1"
local min_version = "2.4.8-2"
local m, s, o
local shadowsocks = "shadowsocks"
local uci = luci.model.uci.cursor()
Expand Down Expand Up @@ -45,7 +45,7 @@ end
if compare_versions(min_version, ">>", get_version()) then
local tip = 'shadowsocks-libev-spec not found'
if pkg_name then
tip = 'Please update the packages: %s' %{pkg_name}
tip = 'Please upgrade %s to v%s and above.' %{pkg_name, min_version}
end
return Map(shadowsocks, translate("ShadowSocks"), '<b style="color:red">%s</b>' %{tip})
end
Expand Down Expand Up @@ -192,16 +192,25 @@ o.datatype = "ip4addr"
-- Part of LAN
s:tab("lan_ac", translate("Interfaces - LAN"))

o = s:taboption("lan_ac", ListValue, "lan_ac_mode", translate("LAN Access Control"))
o:value("0", translate("Disable"))
o:value("w", translate("Allow listed only"))
o:value("b", translate("Allow all except listed"))
o = s:taboption("lan_ac", DynamicList, "interface", translate("Interface"))
o.template = "cbi/network_netlist"
o.nocreate = true
o.unspecified = false
o.widget = "checkbox"
o.default = "lan"
o.rmempty = false

o = s:taboption("lan_ac", DynamicList, "lan_ac_ips", translate("LAN Host List"))
o.datatype = "ipaddr"
o = s:taboption("lan_ac", ListValue, "lan_default_target", translate("Default Action"))
o:value("SS_SPEC_WAN_AC", translate("Normal"))
o:value("RETURN", translate("Bypassed"))
o:value("SS_SPEC_WAN_FW", translate("Global"))
o.default = "SS_SPEC_WAN_AC"

o = s:taboption("lan_ac", DynamicList, "lan_hosts_action", translate("Hosts Action"))
for _, v in ipairs(arp_table) do
o:value(v["IP address"], "%s (%s)" %{v["IP address"], v["HW address"]})
o:value("b,%s" %{v["IP address"]}, "%s %s (%s)" %{translate("Bypassed"), v["IP address"], v["HW address"]})
o:value("g,%s" %{v["IP address"]}, "%s %s (%s)" %{translate("Global"), v["IP address"], v["HW address"]})
o:value("n,%s" %{v["IP address"]}, "%s %s (%s)" %{translate("Normal"), v["IP address"], v["HW address"]})
end

return m

0 comments on commit e69005c

Please sign in to comment.