1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Update shadowsocks luci interface

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-06-17 18:30:39 +02:00
parent 69275038c5
commit 95288f3b1d
14 changed files with 982 additions and 676 deletions

View file

@ -545,15 +545,11 @@ function settings_add()
local obfs = luci.http.formvalue("obfs") or "0" local obfs = luci.http.formvalue("obfs") or "0"
local obfs_plugin = luci.http.formvalue("obfs_plugin") or "v2ray" local obfs_plugin = luci.http.formvalue("obfs_plugin") or "v2ray"
local obfs_type = luci.http.formvalue("obfs_type") or "http" local obfs_type = luci.http.formvalue("obfs_type") or "http"
ucic:foreach("shadowsocks-libev", "ss_redir", function (section) ucic:foreach("shadowsocks-libev", "server", function (section)
ucic:set("shadowsocks-libev",section[".name"],"obfs",obfs) ucic:set("shadowsocks-libev",section[".name"],"obfs",obfs)
ucic:set("shadowsocks-libev",section[".name"],"obfs_plugin",obfs_plugin) ucic:set("shadowsocks-libev",section[".name"],"obfs_plugin",obfs_plugin)
ucic:set("shadowsocks-libev",section[".name"],"obfs_type",obfs_type) ucic:set("shadowsocks-libev",section[".name"],"obfs_type",obfs_type)
end) end)
ucic:set("shadowsocks-libev","tracker","obfs",obfs)
ucic:set("shadowsocks-libev","tracker","obfs_plugin",obfs_plugin)
ucic:set("shadowsocks-libev","tracker","obfs_type",obfs_type)
ucic:save("shadowsocks-libev") ucic:save("shadowsocks-libev")
ucic:commit("shadowsocks-libev") ucic:commit("shadowsocks-libev")

View file

@ -1,6 +1,5 @@
# #
# Copyright (C) 2017 Yousong Zhou <yszhou4tech@gmail.com> # Copyright (C) 2017 Yousong Zhou <yszhou4tech@gmail.com>
# Copyright (C) 2018-2019 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
# #
# This is free software, licensed under the Apache License, Version 2.0 . # This is free software, licensed under the Apache License, Version 2.0 .
# #
@ -8,10 +7,10 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for shadowsocks-libev LUCI_TITLE:=LuCI Support for shadowsocks-libev
LUCI_DEPENDS:=+shadowsocks-libev-config +shadowsocks-libev-ss-local +shadowsocks-libev-ss-redir +shadowsocks-libev-ss-rules +shadowsocks-libev-ss-server +shadowsocks-libev-ss-tunnel +simple-obfs LUCI_DEPENDS:=
PKG_LICENSE:=Apache-2.0 PKG_LICENSE:=Apache-2.0
include ../luci/luci.mk include ../../luci.mk
# call BuildPackage - OpenWrt buildroot signature # call BuildPackage - OpenWrt buildroot signature

View file

@ -22,18 +22,12 @@ m.title = "shadowsocks-libev - %s - %s" % {stype, sname}
s = m:section(NamedSection, sname, stype) s = m:section(NamedSection, sname, stype)
s:tab("general", translate("General Settings")) s:tab("general", translate("General Settings"))
s:tab("advanced", translate("Advanced Settings")) s:tab("advanced", translate("Advanced Settings"))
s:tab("obfuscate", translate("Obfuscating"))
s:taboption("general", Flag, "disabled", translate("Disable")) s:taboption("general", Flag, "disabled", translate("Disable"))
ss.option_install_package(s, "general") ss.option_install_package(s, "general")
ss.options_common(s, "advanced") ss.options_common(s, "advanced")
local obfs_installed = nixio.fs.access("/usr/bin/obfs-local")
local v2ray_installed = nixio.fs.access("/usr/bin/v2ray-plugin")
if obfs_installed or v2ray_installed then
ss.options_obfs(s, "obfuscate")
end
if stype == "ss_server" then if stype == "ss_server" then
ss.options_server(s, "general") ss.options_server(s, {tab="general"})
o = s:taboption("general", Value, "bind_address", o = s:taboption("general", Value, "bind_address",
translate("Bind address"), translate("Bind address"),
translate("The address ss-server will initiate connection from")) translate("The address ss-server will initiate connection from"))
@ -48,13 +42,6 @@ else
translate("The address ss-tunnel will forward traffic to")) translate("The address ss-tunnel will forward traffic to"))
o.datatype = "hostport" o.datatype = "hostport"
end end
if obfs_installed or v2ray_installed then
o = s:taboption("obfuscate", Value, "obfs_host", translate("Host"))
o.default = "www.bing.com"
end
if obfs_installed then
s:taboption("obfuscate", Value, "obfs_uri", translate("HTTP path uri"))
end
end end
return m return m

View file

@ -24,8 +24,7 @@ end
function src_dst_option(s, ...) function src_dst_option(s, ...)
local o = s:taboption(...) local o = s:taboption(...)
--o.datatype = "or(ip4addr,cidr4)" o.datatype = "or(ipaddr,cidr)"
o.datatype = "or(ip4addr,ip6addr)"
end end
s = m:section(NamedSection, "ss_rules", "ss_rules") s = m:section(NamedSection, "ss_rules", "ss_rules")
@ -99,8 +98,8 @@ else
o.inputstyle = "apply" o.inputstyle = "apply"
o.write = function() o.write = function()
return luci.http.redirect( return luci.http.redirect(
luci.dispatcher.build_url("admin/system/packages") .. luci.dispatcher.build_url("admin/system/opkg") ..
"?submit=1&install=iptables-mod-conntrack-extra" "?query=iptables-mod-conntrack-extra"
) )
end end
end end

View file

@ -9,7 +9,7 @@ local m, s
m = Map("shadowsocks-libev", m = Map("shadowsocks-libev",
translate("Remote Servers"), translate("Remote Servers"),
translate("Definition of remote shadowsocks servers. \ translate("Definition of remote shadowsocks servers. \
Disable any of them will also disable instances refering to it.")) Disable any of them will also disable instances referring to it."))
local sname = arg[1] local sname = arg[1]
if sname then if sname then
@ -19,13 +19,18 @@ if sname then
end end
s = m:section(NamedSection, sname, "server") s = m:section(NamedSection, sname, "server")
m.title = m.title .. ' - ' .. sname m.title = m.title .. ' - ' .. sname
opts = {}
else else
s = m:section(TypedSection, "server") s = m:section(TypedSection, "server")
s.template = 'cbi/tblsection' s.template = 'cbi/tblsection'
s.addremove = true s.addremove = true
s.extedit = function(self, section)
return 'servers/' .. section
end
opts = {row=true}
end end
s:option(Flag, "disabled", translate("Disable")) s:option(Flag, "disabled", translate("Disable"))
ss.options_server(s) ss.options_server(s, opts)
return m return m

View file

@ -1,4 +1,3 @@
-- Copyright 2018 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
-- Copyright 2017 Yousong Zhou <yszhou4tech@gmail.com> -- Copyright 2017 Yousong Zhou <yszhou4tech@gmail.com>
-- Licensed to the public under the Apache License 2.0. -- Licensed to the public under the Apache License 2.0.
@ -7,7 +6,6 @@ local ut = require("luci.util")
local sys = require("luci.sys") local sys = require("luci.sys")
local ds = require("luci.dispatcher") local ds = require("luci.dispatcher")
local nw = require("luci.model.network") local nw = require("luci.model.network")
local ucic = luci.model.uci.cursor()
nw.init() nw.init()
module("luci.model.shadowsocks-libev", function(m) module("luci.model.shadowsocks-libev", function(m)
setmetatable(m, {__index=function (self, k) setmetatable(m, {__index=function (self, k)
@ -25,7 +23,7 @@ function values_actions(o)
end end
function values_redir(o, xmode) function values_redir(o, xmode)
ucic:foreach("shadowsocks-libev", "ss_redir", function(sdata) o.map.uci:foreach("shadowsocks-libev", "ss_redir", function(sdata)
local disabled = ucival_to_bool(sdata["disabled"]) local disabled = ucival_to_bool(sdata["disabled"])
local sname = sdata[".name"] local sname = sdata[".name"]
local mode = sdata["mode"] or "tcp_only" local mode = sdata["mode"] or "tcp_only"
@ -39,7 +37,7 @@ function values_redir(o, xmode)
end end
function values_serverlist(o) function values_serverlist(o)
ucic:foreach("shadowsocks-libev", "server", function(sdata) o.map.uci:foreach("shadowsocks-libev", "server", function(sdata)
local sname = sdata[".name"] local sname = sdata[".name"]
local server = sdata["server"] local server = sdata["server"]
local server_port = sdata["server_port"] local server_port = sdata["server_port"]
@ -78,9 +76,13 @@ function options_client(s, tab)
o.datatype = "port" o.datatype = "port"
end end
function options_server(s, tab) function options_server(s, opts)
local o local o
local optfunc local optfunc
local tab = opts and opts.tab or nil
local row = opts and opts.row or false
local v2ray_installed = nixio.fs.access("/usr/bin/v2ray-plugin")
local obfs_installed = nixio.fs.access("/usr/bin/obfs-local")
if tab == nil then if tab == nil then
optfunc = function(...) return s:option(...) end optfunc = function(...) return s:option(...) end
@ -98,12 +100,39 @@ function options_server(s, tab)
for _, m in ipairs(methods) do for _, m in ipairs(methods) do
o:value(m) o:value(m)
end end
o = optfunc(Value, "key", translate("Key (base64 encoding)"))
o.datatype = "base64"
o.password = true
o = optfunc(Value, "password", translate("Password")) o = optfunc(Value, "password", translate("Password"))
o.password = true o.password = true
o.size = 12 o.size = 12
if not row then
o = optfunc(Value, "key", translate("Key (base64)"))
o.datatype = "base64"
o.password = true
o.size = 12
--optfunc(Value, "plugin", translate("Plugin"))
--optfunc(Value, "plugin_opts", translate("Plugin Options"))
optfunc(Flag, "obfs", translate("Enable obfuscation"))
o = optfunc(ListValue, "obfs_plugin", translate("OBFS Plugin"))
if v2ray_installed then
o:value("v2ray")
o.default = "v2ray"
else
o.default = "obfs-simple"
end
if obfs_installed then
o:value("obfs-simple")
end
if v2ray_installed or obfs_installed then
o = optfunc(ListValue, "obfs_type", translate("OBFS Type"))
o:value("http")
o:value("tls")
o.default = "http"
o = optfunc(Value, "obfs_host", translate("OBFS Host"))
o.default = "www.bing.com"
end
if obfs_installed then
o = optfunc(Value, "obfs_uri", translate("OBFS HTTP path uri"))
end
end
end end
function options_common(s, tab) function options_common(s, tab)
@ -121,33 +150,11 @@ function options_common(s, tab)
s:taboption(tab, Value, "user", translate("Run as")) s:taboption(tab, Value, "user", translate("Run as"))
s:taboption(tab, Flag, "verbose", translate("Verbose")) s:taboption(tab, Flag, "verbose", translate("Verbose"))
s:taboption(tab, Flag, "mptcp", translate("Enable MPTCP"))
s:taboption(tab, Flag, "ipv6_first", translate("IPv6 First"), translate("Prefer IPv6 addresses when resolving names")) s:taboption(tab, Flag, "ipv6_first", translate("IPv6 First"), translate("Prefer IPv6 addresses when resolving names"))
s:taboption(tab, Flag, "fast_open", translate("Enable TCP Fast Open")) s:taboption(tab, Flag, "fast_open", translate("Enable TCP Fast Open"))
s:taboption(tab, Flag, "reuse_port", translate("Enable SO_REUSEPORT"))
s:taboption(tab, Flag, "no_delay", translate("Enable TCP_NODELAY")) s:taboption(tab, Flag, "no_delay", translate("Enable TCP_NODELAY"))
s:taboption(tab, Flag, "mptcp", translate("Enable MPTCP")) s:taboption(tab, Flag, "reuse_port", translate("Enable SO_REUSEPORT"))
--s:taboption(tab, Flag, "ebpf", translate("Enable eBPF"))
end
function options_obfs(s, tab)
local o
local v2ray_installed = nixio.fs.access("/usr/bin/v2ray-plugin")
local obfs_installed = nixio.fs.access("/usr/bin/obfs-local")
s:taboption(tab, Flag, "obfs", translate("Enable"))
o = s:taboption(tab, ListValue, "obfs_plugin", translate("Plugin"))
if v2ray_installed then
o:value("v2ray")
o.default = "v2ray"
else
o.default = "obfs-simple"
end
if obfs_installed then
o:value("obfs-simple")
end
o = s:taboption(tab, ListValue, "obfs_type", translate("Type"))
o:value("http")
o:value("tls")
o.default = "http"
end end
function ucival_to_bool(val) function ucival_to_bool(val)
@ -164,20 +171,12 @@ function cfgvalue_overview(sdata)
cfgvalue_overview_(sdata, lines, { cfgvalue_overview_(sdata, lines, {
"bind_address", "bind_address",
}) })
local installed = nixio.fs.access("/usr/bin/obfs-server")
if installed then
cfgvalue_overview_(sdata, lines, names_options_obfs)
end
elseif stype == "ss_local" or stype == "ss_redir" or stype == "ss_tunnel" then elseif stype == "ss_local" or stype == "ss_redir" or stype == "ss_tunnel" then
cfgvalue_overview_(sdata, lines, names_options_client) cfgvalue_overview_(sdata, lines, names_options_client)
if stype == "ss_tunnel" then if stype == "ss_tunnel" then
cfgvalue_overview_(sdata, lines, {"tunnel_address"}) cfgvalue_overview_(sdata, lines, {"tunnel_address"})
end end
cfgvalue_overview_(sdata, lines, names_options_common) cfgvalue_overview_(sdata, lines, names_options_common)
local installed = nixio.fs.access("/usr/bin/obfs-local")
if installed then
cfgvalue_overview_(sdata, lines, names_options_obfs)
end
else else
return nil, nil return nil, nil
end end
@ -186,7 +185,7 @@ function cfgvalue_overview(sdata)
local value = { local value = {
[".name"] = sname, [".name"] = sname,
name = '%s.<var>%s</var>' % {stype, sname}, name = '%s.<var>%s</var>' % {stype, sname},
overview = table.concat(lines, "</br>"), overview = table.concat(lines, "<br />"),
disabled = ucival_to_bool(sdata["disabled"]), disabled = ucival_to_bool(sdata["disabled"]),
} }
return key, value return key, value
@ -231,8 +230,8 @@ function option_install_package(s, tab)
function p_install.write() function p_install.write()
return luci.http.redirect( return luci.http.redirect(
luci.dispatcher.build_url("admin/system/packages") .. luci.dispatcher.build_url("admin/system/opkg") ..
"?submit=1&install=%s" % opkg_package "?query=%s" % opkg_package
) )
end end
end end
@ -243,6 +242,8 @@ names_options_server = {
"method", "method",
"key", "key",
"password", "password",
"plugin",
"plugin_opts",
} }
names_options_client = { names_options_client = {
@ -261,11 +262,6 @@ names_options_common = {
"mtu", "mtu",
"timeout", "timeout",
"user", "user",
"mptcp",
}
names_options_obfs = {
"obfs",
} }
modes = { modes = {

View file

@ -14,7 +14,7 @@
<input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>" value="<%:Add%>" /> <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>" value="<%:Add%>" />
</div> </div>
<script type="text/javascript">//<![CDATA[ <script type="text/javascript">//<![CDATA[
XHR.poll(5, '<%=url('admin/services/shadowsocks-libev/status')%>', null, XHR.poll(-1, '<%=url('admin/services/shadowsocks-libev/status')%>', null,
function(x, st) function(x, st)
{ {
var names = [ var names = [

View file

@ -0,0 +1,368 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.1\n"
"Last-Translator: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: es\n"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:176
msgid "<hidden>"
msgstr "<oculto>"
#: applications/luci-app-shadowsocks-libev/luasrc/view/shadowsocks-libev/add_instance.htm:14
msgid "Add"
msgstr "Añadir"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:24
msgid "Advanced Settings"
msgstr "Configuración avanzada"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:32
msgid "Bind address"
msgstr "Dirección de enlace"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:73
msgid "Bypass ss-redir for packets with dst address in this list"
msgstr "Omitir ss-redir para paquetes con dirección dst en esta lista"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:59
msgid "Bypass ss-redir for packets with src address in this list"
msgstr "Omitir ss-redir para paquetes con dirección src en esta lista"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:65
msgid ""
"Continue to have dst address checked for packets with src address in this "
"list"
msgstr ""
"Continuar con la verificación de la dirección dst para paquetes con "
"dirección src en esta lista"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:47
msgid "Default action for locally generated TCP packets"
msgstr "Acción predeterminada para paquetes TCP generados localmente"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:88
msgid ""
"Default action for packets whose dst address do not match any of the dst ip "
"list"
msgstr ""
"Acción predeterminada para paquetes cuya dirección dst no coincide con "
"ninguna de la lista dst ip"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:68
msgid ""
"Default action for packets whose src address do not match any of the src ip/"
"net list"
msgstr ""
"Acción predeterminada para paquetes cuya dirección src no coincide con "
"ninguna de la lista src ip/net"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/servers.lua:11
msgid ""
"Definition of remote shadowsocks servers. Disable any of them will also "
"disable instances referring to it."
msgstr ""
"Definición de servidores shadowsocks remotos. Deshabilitar cualquiera de "
"ellos también deshabilitará las instancias que lo refieran."
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:33
msgid "Destination Settings"
msgstr "Configuración de destino"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:25
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:35
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/servers.lua:33
msgid "Disable"
msgstr "Deshabilitar"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:86
msgid "Disabled"
msgstr "Deshabilitado"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:87
msgid "Dst default"
msgstr "Dst predeterminado"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:72
msgid "Dst ip/net bypass"
msgstr "Omitir Dst ip/net"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:79
msgid "Dst ip/net bypass file"
msgstr "Omitir archivo Dst ip/net"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:75
msgid "Dst ip/net forward"
msgstr "Reenviar Dst ip/net"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:83
msgid "Dst ip/net forward file"
msgstr "Reenviar archivo Dst ip/net"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:132
msgid "Enable SO_REUSEPORT"
msgstr "Habilitar SO_REUSEPORT"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:130
msgid "Enable TCP Fast Open"
msgstr "Habilitar TCP Fast Open"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:131
msgid "Enable TCP_NODELAY"
msgstr "Habilitar TCP_NODELAY"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:83
msgid "Enable/Disable"
msgstr "Habilitar/Deshabilitar"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:89
msgid "Enabled"
msgstr "Habilitado"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:54
msgid "Extra arguments"
msgstr "Argumentos extra"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:80
msgid ""
"File containing ip/net for the purposes as with <em>Dst ip/net bypass</em>"
msgstr ""
"Archivo que contiene ip/net para los fines como con <em>Omitir Dst ip/net</"
"em>"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:84
msgid ""
"File containing ip/net for the purposes as with <em>Dst ip/net forward</em>"
msgstr ""
"Archivo que contiene ip / net para los fines como con <em>Reenviar Dst ip/"
"net</em>"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:106
msgid "Forward recentrst"
msgstr "Reenviar recentrst"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:107
msgid ""
"Forward those packets whose dst have recently sent to us multiple tcp-rst"
msgstr ""
"Reenviar aquellos paquetes cuyos archivos dst nos hayan enviado "
"recientemente múltiples tcp-rst"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:76
msgid "Forward through ss-redir for packets with dst address in this list"
msgstr ""
"Reenviar a través de ss-redir para paquetes con dirección dst en esta lista"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:62
msgid "Forward through ss-redir for packets with src address in this list"
msgstr ""
"Reenviar a través de ss-redir para paquetes con dirección src en esta lista"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:23
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:31
msgid "General Settings"
msgstr "Configuración general"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:129
msgid "IPv6 First"
msgstr "IPv6 primero"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:50
msgid "Ingress interfaces"
msgstr "Interfaces de ingreso"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:203
msgid "Install package %q"
msgstr "Instalar paquete %q"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:97
msgid "Install package iptables-mod-conntrack-extra"
msgstr "Instalar el paquete iptables-mod-conntrack-extra"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:11
msgid ""
"Instances of shadowsocks-libev components, e.g. ss-local, ss-redir, ss-"
"tunnel, ss-server, etc. To enable an instance it is required to enable both "
"the instance itself and the remote server it refers to."
msgstr ""
"Instancias de componentes de shadowsocks-libev, ej. ss-local, ss-redir, ss-"
"tunnel, ss-server, etc. Para habilitar una instancia, se requiere habilitar "
"tanto la instancia como el servidor remoto al que hace referencia."
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:105
msgid "Key (base64)"
msgstr "Clave (base64)"
#: applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua:13
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:10
msgid "Local Instances"
msgstr "Instancias locales"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:71
msgid "Local address"
msgstr "Dirección local"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:75
msgid "Local port"
msgstr "Puerto local"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:46
msgid "Local-out default"
msgstr "Salida local predeterminada"
# Maximum Transmission Unit
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:122
msgid "MTU"
msgstr "MTU"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:97
msgid "Method"
msgstr "Método"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:117
msgid "Mode of operation"
msgstr "Modo de operación"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:76
#: applications/luci-app-shadowsocks-libev/luasrc/view/shadowsocks-libev/add_instance.htm:12
msgid "Name"
msgstr "Nombre"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:10
msgid ""
"On this page you can configure how traffics are to be forwarded to ss-redir "
"instances. If enabled, packets will first have their src ip addresses "
"checked against <em>Src ip/net bypass</em>, <em>Src ip/net forward</em>, "
"<em>Src ip/net checkdst</em> and if none matches <em>Src default</em> will "
"give the default action to be taken. If the prior check results in action "
"<em>checkdst</em>, packets will continue to have their dst addresses checked."
msgstr ""
"En esta página puede configurar cómo se reenviará el tráfico a las "
"instancias de ss-redir. Si están habilitados, los paquetes tendrán primero "
"sus direcciones src ip verificadas con <em>Omitir Src ip / net</em>, "
"<em>Reenviar Src ip / net</em>, <em>Src ip / net checkdst</em > y si ninguno "
"coincide con <em>Src predeterminado</em> dará la acción predeterminada que "
"se debe realizar. Si la verificación anterior resulta en la acción "
"<em>checkdst</em>, los paquetes continuarán teniendo sus direcciones dst "
"marcadas."
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:51
msgid "Only apply rules on packets from these network interfaces"
msgstr "Solo aplicar reglas en paquetes desde estas interfaces de red"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:78
msgid "Overview"
msgstr "Visión general"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:202
msgid "Package is not installed"
msgstr "Paquete no instalado"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:55
msgid "Passes additional arguments to iptables. Use with care!"
msgstr "Pasa argumentos adicionales a iptables. Utilizar con cuidado!"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:101
msgid "Password"
msgstr "Contraseña"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:109
msgid "Plugin"
msgstr "Plugin"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:110
msgid "Plugin Options"
msgstr "Opciones de plugin"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:129
msgid "Prefer IPv6 addresses when resolving names"
msgstr "Preferir direcciones IPv6 al resolver nombres"
#: applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua:21
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:9
msgid "Redir Rules"
msgstr "Reglas de redireccionamiento"
#: applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua:17
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/servers.lua:10
msgid "Remote Servers"
msgstr "Servidores remotos"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:69
msgid "Remote server"
msgstr "Servidor remoto"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:126
msgid "Run as"
msgstr "Correr como"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:81
msgid "Running"
msgstr "Corriendo"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:91
msgid "Server"
msgstr "Servidor"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:94
msgid "Server port"
msgstr "Puerto del servidor"
#: applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua:9
msgid "Shadowsocks-libev"
msgstr "Shadowsocks-libev"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:32
msgid "Source Settings"
msgstr "Configuración de fuente"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:67
msgid "Src default"
msgstr "Src predeterminado"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:58
msgid "Src ip/net bypass"
msgstr "Omitir Src ip/net"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:64
msgid "Src ip/net checkdst"
msgstr "Src ip/net checkdst"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:61
msgid "Src ip/net forward"
msgstr "Reenviar Src ip/net"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:33
msgid "The address ss-server will initiate connection from"
msgstr "La dirección ss-server iniciará la conexión desde"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:42
msgid "The address ss-tunnel will forward traffic to"
msgstr "La dirección ss-tunnel reenviará el tráfico a"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:124
msgid "Timeout (sec)"
msgstr "Tiempo de espera (seg)"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:41
msgid "Tunnel address"
msgstr "Direccion del tunel"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:128
msgid "Verbose"
msgstr "Verboso"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:39
msgid "ss-redir for TCP"
msgstr "ss-redir para TCP"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:42
msgid "ss-redir for UDP"
msgstr "ss-redir para UDP"

View file

@ -1,281 +0,0 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.6\n"
"Last-Translator: Ycarus <ycarus@zugaina.org>\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Language: fr\n"
msgid "<hidden>"
msgstr "<caché>"
msgid "Add"
msgstr "Ajout"
msgid "Advanced Settings"
msgstr "Configuration avancé"
msgid "Bind address"
msgstr "Port de connexion"
msgid "Bypass ss-redir for packets with dst address in this list"
msgstr ""
"Passer outre ss-redir pour les paquets avec l'adresse de destination dans "
"cette liste"
msgid "Bypass ss-redir for packets with src address in this list"
msgstr ""
"Passer outre ss-redir pour les paquets avec l'adresse source dans cette liste"
msgid ""
"Continue to have dst address checked for packets with src address in this "
"list"
msgstr ""
"Continuer de vérifier les adresses de destination pour les paquets ayant une "
"adresse source dans cette liste"
msgid "Default action for locally generated TCP packets"
msgstr "Action par défaut pour les paquets TCP générés localement"
msgid ""
"Default action for packets whose dst address do not match any of the dst ip "
"list"
msgstr ""
"Action par défaut pour les paquets dont l'adresse destination ne correspond "
"à aucune adresse ip de la liste destination"
msgid ""
"Default action for packets whose src address do not match any of the src ip/"
"net list"
msgstr ""
"Action par défaut pour les paquets dont l'adresse source ne correspond à "
"aucune ip de la liste source"
msgid ""
"Definition of remote shadowsocks servers. Disable any of them will also "
"disable instances refering to it."
msgstr ""
"Configuration des serveurs shadowsocks distant. La désactivation d'un "
"serveur entraine la désactivation des instances l'utilisant."
msgid "Destination Settings"
msgstr "Paramètres de destination"
msgid "Disable"
msgstr "Désactive"
msgid "Disabled"
msgstr "Désactivé"
msgid "Dst default"
msgstr "Destination défaut"
msgid "Dst ip/net bypass"
msgstr ""
msgid "Dst ip/net bypass file"
msgstr ""
msgid "Dst ip/net forward"
msgstr ""
msgid "Dst ip/net forward file"
msgstr ""
msgid "Enable"
msgstr "Activé"
msgid "Enable MPTCP"
msgstr "Activé MPTCP"
msgid "Enable SO_REUSEPORT"
msgstr "Activé SO_REUSEPORT"
msgid "Enable TCP Fast Open"
msgstr "Activé TCP Fast Open"
msgid "Enable TCP_NODELAY"
msgstr "Activé TCP_NODELAY"
msgid "Enable/Disable"
msgstr "Activé/Désactivé"
msgid "Enabled"
msgstr "Activé"
msgid "Extra arguments"
msgstr "Arguments supplémentaires"
msgid ""
"File containing ip/net for the purposes as with <em>Dst ip/net bypass</em>"
msgstr ""
msgid ""
"File containing ip/net for the purposes as with <em>Dst ip/net forward</em>"
msgstr ""
msgid "Forward recentrst"
msgstr ""
msgid ""
"Forward those packets whose dst have recently sent to us multiple tcp-rst"
msgstr ""
msgid "Forward through ss-redir for packets with dst address in this list"
msgstr ""
msgid "Forward through ss-redir for packets with src address in this list"
msgstr ""
msgid "General Settings"
msgstr "Paramètres généraux"
msgid "HTTP path uri"
msgstr ""
msgid "Host"
msgstr "Hôte"
msgid "IPv6 First"
msgstr ""
msgid "Ingress interfaces"
msgstr ""
msgid "Install package %q"
msgstr ""
msgid "Install package iptables-mod-conntrack-extra"
msgstr ""
msgid ""
"Instances of shadowsocks-libev components, e.g. ss-local, ss-redir, ss-"
"tunnel, ss-server, etc. To enable an instance it is required to enable both "
"the instance itself and the remote server it refers to."
msgstr ""
msgid "Key (base64 encoding)"
msgstr "Clef (base64)"
msgid "Local Instances"
msgstr "Instances Locales"
msgid "Local address"
msgstr "Adresse locale"
msgid "Local port"
msgstr "Port local"
msgid "Local-out default"
msgstr ""
msgid "MTU"
msgstr ""
msgid "Method"
msgstr "Méthode"
msgid "Mode of operation"
msgstr ""
msgid "Name"
msgstr "Nom"
msgid "Obfuscating"
msgstr ""
msgid ""
"On this page you can configure how traffics are to be forwarded to ss-redir "
"instances. If enabled, packets will first have their src ip addresses "
"checked against <em>Src ip/net bypass</em>, <em>Src ip/net forward</em>, "
"<em>Src ip/net checkdst</em> and if none matches <em>Src default</em> will "
"give the default action to be taken. If the prior check results in action "
"<em>checkdst</em>, packets will continue to have their dst addresses checked."
msgstr ""
msgid "Only apply rules on packets from these network interfaces"
msgstr ""
msgid "Overview"
msgstr "Aperçu"
msgid "Package is not installed"
msgstr ""
msgid "Passes additional arguments to iptables. Use with care!"
msgstr ""
msgid "Password"
msgstr "Mot de passe"
msgid "Prefer IPv6 addresses when resolving names"
msgstr ""
msgid "Redir Rules"
msgstr "Règles de redirection"
msgid "Remote Servers"
msgstr "Serveurs distant"
msgid "Remote server"
msgstr "Serveur distant"
msgid "Run as"
msgstr "Lance en tant que"
msgid "Running"
msgstr "Lancé"
msgid "Server"
msgstr "Serveur"
msgid "Server port"
msgstr "Port du serveur"
msgid "Shadowsocks-libev"
msgstr ""
msgid "Source Settings"
msgstr "Paramètres de la source"
msgid "Src default"
msgstr ""
msgid "Src ip/net bypass"
msgstr ""
msgid "Src ip/net checkdst"
msgstr ""
msgid "Src ip/net forward"
msgstr ""
msgid "The address ss-server will initiate connection from"
msgstr ""
msgid "The address ss-tunnel will forward traffic to"
msgstr ""
msgid "Timeout (sec)"
msgstr ""
msgid "Tunnel address"
msgstr ""
msgid "Type"
msgstr ""
msgid "Verbose"
msgstr ""
msgid "ss-redir for TCP"
msgstr ""
msgid "ss-redir for UDP"
msgstr ""

View file

@ -1,173 +1,210 @@
msgid "" msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8" msgstr "Content-Type: text/plain; charset=UTF-8"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:176
msgid "<hidden>" msgid "<hidden>"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/view/shadowsocks-libev/add_instance.htm:14
msgid "Add" msgid "Add"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:24
msgid "Advanced Settings" msgid "Advanced Settings"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:32
msgid "Bind address" msgid "Bind address"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:73
msgid "Bypass ss-redir for packets with dst address in this list" msgid "Bypass ss-redir for packets with dst address in this list"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:59
msgid "Bypass ss-redir for packets with src address in this list" msgid "Bypass ss-redir for packets with src address in this list"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:65
msgid "" msgid ""
"Continue to have dst address checked for packets with src address in this " "Continue to have dst address checked for packets with src address in this "
"list" "list"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:47
msgid "Default action for locally generated TCP packets" msgid "Default action for locally generated TCP packets"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:88
msgid "" msgid ""
"Default action for packets whose dst address do not match any of the dst ip " "Default action for packets whose dst address do not match any of the dst ip "
"list" "list"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:68
msgid "" msgid ""
"Default action for packets whose src address do not match any of the src ip/" "Default action for packets whose src address do not match any of the src ip/"
"net list" "net list"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/servers.lua:11
msgid "" msgid ""
"Definition of remote shadowsocks servers. Disable any of them will also " "Definition of remote shadowsocks servers. Disable any of them will also "
"disable instances refering to it." "disable instances referring to it."
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:33
msgid "Destination Settings" msgid "Destination Settings"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:25
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:35
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/servers.lua:33
msgid "Disable" msgid "Disable"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:86
msgid "Disabled" msgid "Disabled"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:87
msgid "Dst default" msgid "Dst default"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:72
msgid "Dst ip/net bypass" msgid "Dst ip/net bypass"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:79
msgid "Dst ip/net bypass file" msgid "Dst ip/net bypass file"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:75
msgid "Dst ip/net forward" msgid "Dst ip/net forward"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:83
msgid "Dst ip/net forward file" msgid "Dst ip/net forward file"
msgstr "" msgstr ""
msgid "Enable" #: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:132
msgstr ""
msgid "Enable MPTCP"
msgstr ""
msgid "Enable SO_REUSEPORT" msgid "Enable SO_REUSEPORT"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:130
msgid "Enable TCP Fast Open" msgid "Enable TCP Fast Open"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:131
msgid "Enable TCP_NODELAY" msgid "Enable TCP_NODELAY"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:83
msgid "Enable/Disable" msgid "Enable/Disable"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:89
msgid "Enabled" msgid "Enabled"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:54
msgid "Extra arguments" msgid "Extra arguments"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:80
msgid "" msgid ""
"File containing ip/net for the purposes as with <em>Dst ip/net bypass</em>" "File containing ip/net for the purposes as with <em>Dst ip/net bypass</em>"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:84
msgid "" msgid ""
"File containing ip/net for the purposes as with <em>Dst ip/net forward</em>" "File containing ip/net for the purposes as with <em>Dst ip/net forward</em>"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:106
msgid "Forward recentrst" msgid "Forward recentrst"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:107
msgid "" msgid ""
"Forward those packets whose dst have recently sent to us multiple tcp-rst" "Forward those packets whose dst have recently sent to us multiple tcp-rst"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:76
msgid "Forward through ss-redir for packets with dst address in this list" msgid "Forward through ss-redir for packets with dst address in this list"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:62
msgid "Forward through ss-redir for packets with src address in this list" msgid "Forward through ss-redir for packets with src address in this list"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:23
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:31
msgid "General Settings" msgid "General Settings"
msgstr "" msgstr ""
msgid "HTTP path uri" #: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:129
msgstr ""
msgid "Host"
msgstr ""
msgid "IPv6 First" msgid "IPv6 First"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:50
msgid "Ingress interfaces" msgid "Ingress interfaces"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:203
msgid "Install package %q" msgid "Install package %q"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:97
msgid "Install package iptables-mod-conntrack-extra" msgid "Install package iptables-mod-conntrack-extra"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:11
msgid "" msgid ""
"Instances of shadowsocks-libev components, e.g. ss-local, ss-redir, ss-" "Instances of shadowsocks-libev components, e.g. ss-local, ss-redir, ss-"
"tunnel, ss-server, etc. To enable an instance it is required to enable both " "tunnel, ss-server, etc. To enable an instance it is required to enable both "
"the instance itself and the remote server it refers to." "the instance itself and the remote server it refers to."
msgstr "" msgstr ""
msgid "Key (base64 encoding)" #: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:105
msgid "Key (base64)"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua:13
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:10
msgid "Local Instances" msgid "Local Instances"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:71
msgid "Local address" msgid "Local address"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:75
msgid "Local port" msgid "Local port"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:46
msgid "Local-out default" msgid "Local-out default"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:122
msgid "MTU" msgid "MTU"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:97
msgid "Method" msgid "Method"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:117
msgid "Mode of operation" msgid "Mode of operation"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:76
#: applications/luci-app-shadowsocks-libev/luasrc/view/shadowsocks-libev/add_instance.htm:12
msgid "Name" msgid "Name"
msgstr "" msgstr ""
msgid "Obfuscating" #: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:10
msgstr ""
msgid "" msgid ""
"On this page you can configure how traffics are to be forwarded to ss-redir " "On this page you can configure how traffics are to be forwarded to ss-redir "
"instances. If enabled, packets will first have their src ip addresses " "instances. If enabled, packets will first have their src ip addresses "
@ -177,83 +214,116 @@ msgid ""
"<em>checkdst</em>, packets will continue to have their dst addresses checked." "<em>checkdst</em>, packets will continue to have their dst addresses checked."
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:51
msgid "Only apply rules on packets from these network interfaces" msgid "Only apply rules on packets from these network interfaces"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:78
msgid "Overview" msgid "Overview"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:202
msgid "Package is not installed" msgid "Package is not installed"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:55
msgid "Passes additional arguments to iptables. Use with care!" msgid "Passes additional arguments to iptables. Use with care!"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:101
msgid "Password" msgid "Password"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:109
msgid "Plugin"
msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:110
msgid "Plugin Options"
msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:129
msgid "Prefer IPv6 addresses when resolving names" msgid "Prefer IPv6 addresses when resolving names"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua:21
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:9
msgid "Redir Rules" msgid "Redir Rules"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua:17
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/servers.lua:10
msgid "Remote Servers" msgid "Remote Servers"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:69
msgid "Remote server" msgid "Remote server"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:126
msgid "Run as" msgid "Run as"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:81
msgid "Running" msgid "Running"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:91
msgid "Server" msgid "Server"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:94
msgid "Server port" msgid "Server port"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua:9
msgid "Shadowsocks-libev" msgid "Shadowsocks-libev"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:32
msgid "Source Settings" msgid "Source Settings"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:67
msgid "Src default" msgid "Src default"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:58
msgid "Src ip/net bypass" msgid "Src ip/net bypass"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:64
msgid "Src ip/net checkdst" msgid "Src ip/net checkdst"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:61
msgid "Src ip/net forward" msgid "Src ip/net forward"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:33
msgid "The address ss-server will initiate connection from" msgid "The address ss-server will initiate connection from"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:42
msgid "The address ss-tunnel will forward traffic to" msgid "The address ss-tunnel will forward traffic to"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:124
msgid "Timeout (sec)" msgid "Timeout (sec)"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:41
msgid "Tunnel address" msgid "Tunnel address"
msgstr "" msgstr ""
msgid "Type" #: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:128
msgstr ""
msgid "Verbose" msgid "Verbose"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:39
msgid "ss-redir for TCP" msgid "ss-redir for TCP"
msgstr "" msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:42
msgid "ss-redir for UDP" msgid "ss-redir for UDP"
msgstr "" msgstr ""

View file

@ -0,0 +1,343 @@
msgid ""
msgstr ""
"Last-Translator: Yousong Zhou <yszhou4tech@gmail.com>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:176
msgid "<hidden>"
msgstr "<已隐藏>"
#: applications/luci-app-shadowsocks-libev/luasrc/view/shadowsocks-libev/add_instance.htm:14
msgid "Add"
msgstr "添加"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:24
msgid "Advanced Settings"
msgstr "高级设置"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:32
msgid "Bind address"
msgstr "绑定地址"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:73
msgid "Bypass ss-redir for packets with dst address in this list"
msgstr "对于目的地址在列表中的报文绕过ss-redir"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:59
msgid "Bypass ss-redir for packets with src address in this list"
msgstr "对于源地址在列表中的报文绕过ss-redir"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:65
msgid ""
"Continue to have dst address checked for packets with src address in this "
"list"
msgstr "对于源地址在列表中的报文,继续检查其目的地址"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:47
msgid "Default action for locally generated TCP packets"
msgstr "对于设备本身产生的TCP报文的默认行为"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:88
msgid ""
"Default action for packets whose dst address do not match any of the dst ip "
"list"
msgstr "对于目的地址不在列表中的报文的默认行为"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:68
msgid ""
"Default action for packets whose src address do not match any of the src ip/"
"net list"
msgstr "对于源地址不在列表中的报文的默认行为"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/servers.lua:11
msgid ""
"Definition of remote shadowsocks servers. Disable any of them will also "
"disable instances referring to it."
msgstr ""
"在此页面设定访问远端shadowsocks服务器的参数。请注意禁用远端服务器会同时停止"
"与之关联的shadowsocks-libev组件"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:33
msgid "Destination Settings"
msgstr "目的地址设定"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:25
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:35
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/servers.lua:33
msgid "Disable"
msgstr "禁用"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:86
msgid "Disabled"
msgstr "已禁用"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:87
msgid "Dst default"
msgstr "目的未匹配时默认行为"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:72
msgid "Dst ip/net bypass"
msgstr "绕过"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:79
msgid "Dst ip/net bypass file"
msgstr "绕过(文件)"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:75
msgid "Dst ip/net forward"
msgstr "转发"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:83
msgid "Dst ip/net forward file"
msgstr "转发(文件)"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:132
msgid "Enable SO_REUSEPORT"
msgstr "启用SO_REUSEPORT"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:130
msgid "Enable TCP Fast Open"
msgstr "启用TCP Fast Open"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:131
msgid "Enable TCP_NODELAY"
msgstr "启用TCP_NODELAY"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:83
msgid "Enable/Disable"
msgstr "启用/禁用"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:89
msgid "Enabled"
msgstr "已启用"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:54
msgid "Extra arguments"
msgstr "额外参数"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:80
msgid ""
"File containing ip/net for the purposes as with <em>Dst ip/net bypass</em>"
msgstr "文件列出需要绕过ss-redir转发的地址和网段"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:84
msgid ""
"File containing ip/net for the purposes as with <em>Dst ip/net forward</em>"
msgstr "文件列出需要使用ss-redir转发的地址和网段"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:106
msgid "Forward recentrst"
msgstr "转发被连接重置的地址"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:107
msgid ""
"Forward those packets whose dst have recently sent to us multiple tcp-rst"
msgstr "若近期多次收到某地址的连接重置报文,则将其加入到转发列表中"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:76
msgid "Forward through ss-redir for packets with dst address in this list"
msgstr "对于目的地址在列表中的报文通过ss-redir转发"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:62
msgid "Forward through ss-redir for packets with src address in this list"
msgstr "对于源地址在列表中的报文通过ss-redir转发"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:23
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:31
msgid "General Settings"
msgstr "常规设置"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:129
msgid "IPv6 First"
msgstr "IPv6优先"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:50
msgid "Ingress interfaces"
msgstr "入口网卡"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:203
msgid "Install package %q"
msgstr "安装%q"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:97
msgid "Install package iptables-mod-conntrack-extra"
msgstr "安装iptables-mod-conntrack-extra"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:11
msgid ""
"Instances of shadowsocks-libev components, e.g. ss-local, ss-redir, ss-"
"tunnel, ss-server, etc. To enable an instance it is required to enable both "
"the instance itself and the remote server it refers to."
msgstr ""
"此页面展示本地运行的shadowsocks-libev各组件实例如ss-local、ss-redir、ss-"
"tunnel、ss-server等。请注意实际启用一个实例要求实例本身及所关联的远端服务器"
"都是启用状态。"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:105
msgid "Key (base64)"
msgstr "密钥base64"
#: applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua:13
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:10
msgid "Local Instances"
msgstr "本地实例"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:71
msgid "Local address"
msgstr "监听地址"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:75
msgid "Local port"
msgstr "监听端口"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:46
msgid "Local-out default"
msgstr "本地报文默认行为"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:122
msgid "MTU"
msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:97
msgid "Method"
msgstr "加密方法"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:117
msgid "Mode of operation"
msgstr "工作模式"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:76
#: applications/luci-app-shadowsocks-libev/luasrc/view/shadowsocks-libev/add_instance.htm:12
msgid "Name"
msgstr "名称"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:10
msgid ""
"On this page you can configure how traffics are to be forwarded to ss-redir "
"instances. If enabled, packets will first have their src ip addresses "
"checked against <em>Src ip/net bypass</em>, <em>Src ip/net forward</em>, "
"<em>Src ip/net checkdst</em> and if none matches <em>Src default</em> will "
"give the default action to be taken. If the prior check results in action "
"<em>checkdst</em>, packets will continue to have their dst addresses checked."
msgstr ""
"在此页面您可以配置指定报文是否通过ss-redir转发。启用后规则会先将报文的源"
"地址与相应的地址集进行匹配,依次决定是否“绕过(<em>bypass</em>)”、“转发"
"<em>forward</em>)”,或“继续匹配目的地址(<em>checkdst</em>)”;若未在集合"
"中找到匹配,则执行指定的默认动作。继续匹配目的地址时同理。"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:51
msgid "Only apply rules on packets from these network interfaces"
msgstr "仅对来自指定网卡的报文应用规则"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:78
msgid "Overview"
msgstr "概览"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:202
msgid "Package is not installed"
msgstr "依赖包未安装"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:55
msgid "Passes additional arguments to iptables. Use with care!"
msgstr "给iptables的额外参数。请小心使用"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:101
msgid "Password"
msgstr "密码"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:109
msgid "Plugin"
msgstr "启用插件"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:110
msgid "Plugin Options"
msgstr "插件选项"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:129
msgid "Prefer IPv6 addresses when resolving names"
msgstr "名字解析时优先取用IPv6地址"
#: applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua:21
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:9
msgid "Redir Rules"
msgstr "转发规则"
#: applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua:17
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/servers.lua:10
msgid "Remote Servers"
msgstr "远端服务器"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:69
msgid "Remote server"
msgstr "服务器"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:126
msgid "Run as"
msgstr "运行时用户"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instances.lua:81
msgid "Running"
msgstr "运行中"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:91
msgid "Server"
msgstr "监听地址"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:94
msgid "Server port"
msgstr "监听端口"
#: applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua:9
msgid "Shadowsocks-libev"
msgstr ""
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:32
msgid "Source Settings"
msgstr "源地址设定"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:67
msgid "Src default"
msgstr "源未匹配默认行为"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:58
msgid "Src ip/net bypass"
msgstr "绕过"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:64
msgid "Src ip/net checkdst"
msgstr "继续匹配目的地址"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:61
msgid "Src ip/net forward"
msgstr "转发"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:33
msgid "The address ss-server will initiate connection from"
msgstr "ss-server建立连接时使用的源地址"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:42
msgid "The address ss-tunnel will forward traffic to"
msgstr "ss-tunnel所建立隧道的对端地址"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:124
msgid "Timeout (sec)"
msgstr "超时时间(秒)"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua:41
msgid "Tunnel address"
msgstr "隧道对端地址"
#: applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua:128
msgid "Verbose"
msgstr "记录详细日志"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:39
msgid "ss-redir for TCP"
msgstr "用于TCP转发的ss-redir"
#: applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua:42
msgid "ss-redir for UDP"
msgstr "用于UDP转发的ss-redir"

View file

@ -108,6 +108,9 @@ _get_ss_redir() {
[ "$cf_fast_open" = "1" ] && fast_open="true" [ "$cf_fast_open" = "1" ] && fast_open="true"
config_get cf_no_delay $1 no_delay config_get cf_no_delay $1 no_delay
[ "$cf_no_delay" = "1" ] && no_delay="true" [ "$cf_no_delay" = "1" ] && no_delay="true"
}
_get_ss_server() {
config_get cf_obfs $1 obfs config_get cf_obfs $1 obfs
[ "$cf_obfs" = "1" ] && obfs="true" [ "$cf_obfs" = "1" ] && obfs="true"
config_get obfs_plugin $1 obfs_plugin config_get obfs_plugin $1 obfs_plugin
@ -145,6 +148,7 @@ _set_ss_server_vps() {
obfs_type="http" obfs_type="http"
config_load shadowsocks-libev config_load shadowsocks-libev
config_foreach _get_ss_redir ss_redir config_foreach _get_ss_redir ss_redir
config_foreach _get_ss_server server
if [ "$current_obfs_plugin" != "$obfs_plugin" ] || [ "$current_obfs_type" != "$obfs_type" ] || [ "$current_port" != "$port" ] || [ "$current_method" != "$method" ] || [ "$current_key" != "$key" ] || [ "$current_ebpf" != "$ebpf" ] || [ "$current_obfs" != "$obfs" ] || [ "$current_fast_open" != "$fast_open" ] || [ "$current_no_delay" != "$no_delay" ]; then if [ "$current_obfs_plugin" != "$obfs_plugin" ] || [ "$current_obfs_type" != "$obfs_type" ] || [ "$current_port" != "$port" ] || [ "$current_method" != "$method" ] || [ "$current_key" != "$key" ] || [ "$current_ebpf" != "$ebpf" ] || [ "$current_obfs" != "$obfs" ] || [ "$current_fast_open" != "$fast_open" ] || [ "$current_no_delay" != "$no_delay" ]; then
local settings local settings
@ -381,22 +385,18 @@ _set_config_from_vps() {
config_foreach _set_ss_redir ss_redir "no_delay" $ss_no_delay config_foreach _set_ss_redir ss_redir "no_delay" $ss_no_delay
config_foreach _set_ss_redir ss_redir "fast_open" $ss_fast_open config_foreach _set_ss_redir ss_redir "fast_open" $ss_fast_open
config_foreach _set_ss_redir ss_redir "ebpf" $ss_ebpf config_foreach _set_ss_redir ss_redir "ebpf" $ss_ebpf
config_foreach _set_ss_redir ss_redir "obfs" $ss_obfs
config_foreach _set_ss_redir ss_redir "obfs_plugin" $ss_obfs_plugin
config_foreach _set_ss_redir ss_redir "obfs_type" $ss_obfs_type
config_foreach _set_ss_redir ss_redir "obfs_host" $ss_obfs_host
config_foreach _set_ss_redir ss_local "no_delay" $ss_no_delay config_foreach _set_ss_redir ss_local "no_delay" $ss_no_delay
config_foreach _set_ss_redir ss_local "fast_open" $ss_fast_open config_foreach _set_ss_redir ss_local "fast_open" $ss_fast_open
config_foreach _set_ss_redir ss_local "ebpf" $ss_ebpf config_foreach _set_ss_redir ss_local "ebpf" $ss_ebpf
config_foreach _set_ss_redir ss_local "obfs" $ss_obfs
config_foreach _set_ss_redir ss_local "obfs_plugin" $ss_obfs_plugin
config_foreach _set_ss_redir ss_local "obfs_type" $ss_obfs_type
config_foreach _set_ss_redir ss_local "obfs_host" $ss_obfs_host
uci -q batch <<-EOF >/dev/null uci -q batch <<-EOF >/dev/null
set shadowsocks-libev.sss0.key=$ss_key set shadowsocks-libev.sss0.key=$ss_key
set shadowsocks-libev.sss0.server_port=$ss_port set shadowsocks-libev.sss0.server_port=$ss_port
set shadowsocks-libev.sss0.method=$ss_method set shadowsocks-libev.sss0.method=$ss_method
set shadowsocks-libev.sss0.disabled=$shadowsocks_disabled set shadowsocks-libev.sss0.disabled=$shadowsocks_disabled
set shadowsocks-libev.sss0.obfs=$ss_obfs
set shadowsocks-libev.sss0.obfs_plugin=$ss_obfs_plugin
set shadowsocks-libev.sss0.obfs_type=$ss_obfs_type
set shadowsocks-libev.sss0.obfs_host=$ss_obfs_host
commit shadowsocks-libev commit shadowsocks-libev
EOF EOF
logger -t "OMR-VPS" "Shadowsocks restart..." logger -t "OMR-VPS" "Shadowsocks restart..."

View file

@ -36,12 +36,6 @@ if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then
EOF EOF
done done
fi fi
if [ "$(uci -q get shadowsocks-libev.sss0.method)" != "chacha20" ]; then
uci -q batch <<-EOF > /dev/null
set shadowsocks-libev.sss0.method=chacha20
commit shadowsocks-libev
EOF
fi
if [ "$(uci -q get shadowsocks-libev.hi.mode)" != "tcp" ]; then if [ "$(uci -q get shadowsocks-libev.hi.mode)" != "tcp" ]; then
uci -q batch <<-EOF > /dev/null uci -q batch <<-EOF > /dev/null
set shadowsocks-libev.hi.mode=tcp_and_udp set shadowsocks-libev.hi.mode=tcp_and_udp
@ -55,5 +49,14 @@ if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then
done done
fi fi
fi fi
if [ "$(uci -q get shadowsocks-libev.hi.obfs)" != "0" ]; then
uci -q batch <<-EOF > /dev/null
set shadowsocks-libev.sss0.obfs=1
set shadowsocks-libev.sss0.obfs_plugin="$(uci -q get shadowsocks-libev.hi.obfs_plugin)"
set shadowsocks-libev.sss0.obfs_host="$(uci -q get shadowsocks-libev.hi.obfs_host)"
set shadowsocks-libev.sss0.obfs_type="$(uci -q get shadowsocks-libev.hi.obfs_type)"
EOF
fi
rm -f /tmp/luci-indexcache rm -f /tmp/luci-indexcache
exit 0 exit 0

View file

@ -1,7 +1,6 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# #
# Copyright (C) 2017 Yousong Zhou <yszhou4tech@gmail.com> # Copyright (C) 2017-2019 Yousong Zhou <yszhou4tech@gmail.com>
# Copyright (C) 2018 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
# #
# This is free software, licensed under the GNU General Public License v3. # This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -9,30 +8,10 @@
USE_PROCD=1 USE_PROCD=1
EXTRA_COMMANDS="rules_up rules_down rules_exist" EXTRA_COMMANDS="rules_up rules_down rules_exist"
START=98 START=99
ss_confdir=/var/etc/shadowsocks-libev ss_confdir=/var/etc/shadowsocks-libev
ss_bindir=/usr/bin ss_bindir=/usr/bin
q='"'
ss_mkjson() {
echo "{" >"$confjson"
if ss_mkjson_ "$@" >>$confjson; then
sed -i -e '/^\s*$/d' -e '2,$s/^/\t/' -e '$s/,$//' "$confjson"
echo "}" >>"$confjson"
else
rm -f "$confjson"
return 1
fi
}
ss_mkjson_() {
local func
for func in "$@"; do
"$func" || return 1
done
}
ss_mkjson_server_conf() { ss_mkjson_server_conf() {
local cfgserver local cfgserver
@ -47,159 +26,52 @@ ss_mkjson_server_conf() {
ss_mkjson_server_conf_() { ss_mkjson_server_conf_() {
[ -n "$server_port" ] || return 1 [ -n "$server_port" ] || return 1
password="${password//\"/\\\"}" [ -z "$server" ] || json_add_string server "$server"
key="$(echo $key | sed 's/+/-/g; s/\//_/g;')" json_add_int server_port "$server_port"
[ "$method" = "none" -a -z "$key" ] && key="" [ -z "$method" ] || json_add_string method "$method"
[ "$ebpf" = 1 ] && { [ -z "$key" ] || json_add_string key "$key"
key="" [ -z "$password" ] || json_add_string password "$password"
method="none" [ -z "$plugin" ] || json_add_string plugin "$plugin"
} [ -z "$plugin_opts" ] || json_add_string plugin_opts "$plugin_opts"
cat <<-EOF if [ "$obfs" = 1; then
${server:+${q}server${q}: ${q}$server${q},} if [ "$obfs_plugin" = "obfs" ]; then
"server_port": $server_port, obfs_options="obfs=$obfs_type"
${method:+${q}method${q}: ${q}$method${q},} [ -z "$obfs_host" ] || obfs_options="$obfs_options;obfs-host=$obfs_host"
${key:+${q}key${q}: ${q}$key${q},} [ -z "$obfs_uri" ] || obfs_options="$obfs_options;obfs-uri=$obfs_uri"
${password:+${q}password${q}: ${q}$password${q},} [ "$fast_open" = 1 ] && obfs_options="$obfs_options;fast-open"
EOF [ "$mptcp" = 1 ] && obfs_options="$obfs_options;mptcp"
} [ -z "$timeout" ] || obfs_options="$obfs_options;t=$timeout"
json_add_string plugin "/usr/bin/obfs-local"
ss_mkjson_common_conf() { json_add_string plugin_opts "$obfs_options"
[ "$ipv6_first" = 0 ] && ipv6_first=false || ipv6_first=true fi
[ "$fast_open" = 0 ] && fast_open=false || fast_open=true if [ "$obfs_plugin" = "v2ray" ]; then
[ "$no_delay" = 0 ] && no_delay=false || no_delay=true obfs_options="loglevel=default"
[ "$reuse_port" = 0 ] && reuse_port=false || reuse_port=true [ "$obfs_type" = "tls" ] && obfs_options="tls"
[ "$mptcp" = 0 ] && mptcp=false || mptcp=true [ -z "$obfs_host" ] || obfs_options="$obfs_options;host=$obfs_host"
[ "$syslog" = 0 ] && syslog=false || syslog=true [ -z "$obfs_uri" ] || obfs_options="$obfs_options;path=$obfs_uri"
[ "$ebpf" = 0 ] && ebpf=false || ebpf=true [ "$fast_open" = 1 ] && obfs_options="$obfs_options;fast-open"
cat <<-EOF json_add_string plugin "/usr/bin/v2ray-plugin"
"use_syslog": $syslog, json_add_string plugin_opts "$obfs_options"
"ipv6_first": $ipv6_first, fi
"fast_open": $fast_open, fi
"no_delay": $no_delay,
"mptcp": $mptcp,
"ebpf": $ebpf,
"reuse_port": $reuse_port,
${local_address:+${q}local_address${q}: ${q}$local_address${q},}
${local_port:+${q}local_port${q}: $local_port,}
${mode:+${q}mode${q}: ${q}$mode${q},}
${mtu:+${q}mtu${q}: $mtu,}
${timeout:+${q}timeout${q}: $timeout,}
${user:+${q}user${q}: ${q}$user${q},}
EOF
} }
ss_mkjson_ss_local_conf() { ss_mkjson_ss_local_conf() {
ss_mkjson_server_conf ss_mkjson_server_conf
[ "$obfs" = 0 ] && obfs=false || obfs=true
if $obfs; then
if [ "$obfs_plugin" = "obfs" ]; then
obfs_options="obfs=$obfs_type"
[ -z "$obfs_host" ] || obfs_options="$obfs_options;obfs-host=$obfs_host"
[ -z "$obfs_uri" ] || obfs_options="$obfs_options;obfs-uri=$obfs_uri"
[ "$fast_open" = true ] && obfs_options="$obfs_options;fast-open"
[ "$mptcp" = true ] && obfs_options="$obfs_options;mptcp"
[ -z "$timeout" ] || obfs_options="$obfs_options;t=$timeout"
cat <<-EOF
${obfs:+${q}plugin${q}: ${q}/usr/bin/obfs-local${q},${q}plugin_opts${q}: ${q}$obfs_options${q},}
EOF
fi
if [ "$obfs_plugin" = "v2ray" ]; then
obfs_options="loglevel=default"
[ "$obfs_type" = "tls" ] && obfs_options="tls"
[ -z "$obfs_host" ] || obfs_options="$obfs_options;host=$obfs_host"
[ -z "$obfs_uri" ] || obfs_options="$obfs_options;path=$obfs_uri"
[ "$fast_open" = true ] && obfs_options="$obfs_options;fast-open"
cat <<-EOF
${obfs:+${q}plugin${q}: ${q}/usr/bin/v2ray-plugin${q},${q}plugin_opts${q}: ${q}$obfs_options${q},}
EOF
fi
fi
} }
ss_mkjson_ss_redir_conf() { ss_mkjson_ss_redir_conf() {
ss_mkjson_server_conf || return 1 ss_mkjson_server_conf
[ "$disable_sni" = 0 ] && disable_sni=false || disable_sni=true
cat <<-EOF
"disable_sni": $disable_sni,
EOF
[ "$obfs" = 0 ] && obfs=false || obfs=true
if $obfs; then
if [ "$obfs_plugin" = "obfs" ]; then
obfs_options="obfs=$obfs_type"
[ -z "$obfs_host" ] || obfs_options="$obfs_options;obfs-host=$obfs_host"
[ -z "$obfs_uri" ] || obfs_options="$obfs_options;obfs-uri=$obfs_uri"
[ "$fast_open" = true ] && obfs_options="$obfs_options;fast-open"
[ "$mptcp" = true ] && obfs_options="$obfs_options;mptcp"
[ -z "$timeout" ] || obfs_options="$obfs_options;t=$timeout"
cat <<-EOF
${obfs:+${q}plugin${q}: ${q}/usr/bin/obfs-local${q},${q}plugin_opts${q}: ${q}$obfs_options${q},}
EOF
fi
if [ "$obfs_plugin" = "v2ray" ]; then
obfs_options="loglevel=default"
[ "$obfs_type" = "tls" ] && obfs_options="tls"
[ -z "$obfs_host" ] || obfs_options="$obfs_options;host=$obfs_host"
[ -z "$obfs_uri" ] || obfs_options="$obfs_options;path=$obfs_uri"
[ "$fast_open" = true ] && obfs_options="$obfs_options;fast-open"
cat <<-EOF
${obfs:+${q}plugin${q}: ${q}/usr/bin/v2ray-plugin${q},${q}plugin_opts${q}: ${q}$obfs_options${q},}
EOF
fi
fi
} }
ss_mkjson_ss_server_conf() { ss_mkjson_ss_server_conf() {
ss_mkjson_server_conf_ ss_mkjson_server_conf_
[ "$obfs" = 0 ] && obfs=false || obfs=true
if $obfs; then
if [ "$obfs_plugin" = "obfs" ]; then
obfs_options="obfs=$obfs_type"
[ "$fast_open" = true ] && obfs_options="$obfs_options;fast-open"
[ "$mptcp" = true ] && obfs_options="$obfs_options;mptcp"
[ -z "$timeout" ] || obfs_options="$obfs_options;t=$timeout"
cat <<-EOF
${obfs:+${q}plugin${q}: ${q}/usr/bin/obfs-server${q},${q}plugin_opts${q}: ${q}$obfs_options${q},}
EOF
fi
if [ "$obfs_plugin" = "v2ray" ]; then
obfs_options="server"
[ "$obfs_type" = "tls" ] && obfs_options="tls"
[ "$fast_open" = true ] && obfs_options="$obfs_options;fast-open"
cat <<-EOF
${obfs:+${q}plugin${q}: ${q}/usr/bin/v2ray-plugin${q},${q}plugin_opts${q}: ${q}$obfs_options${q},}
EOF
fi
fi
} }
ss_mkjson_ss_tunnel_conf() { ss_mkjson_ss_tunnel_conf() {
ss_mkjson_server_conf || return 1 ss_mkjson_server_conf || return 1
[ -n "$tunnel_address" ] || return 1 [ -n "$tunnel_address" ] || return 1
cat <<-EOF json_add_string tunnel_address "$tunnel_address"
${tunnel_address:+${q}tunnel_address${q}: ${q}$tunnel_address${q},}
EOF
[ "$obfs" = 0 ] && obfs=false || obfs=true
if $obfs; then
if [ "$obfs_plugin" = "obfs" ]; then
obfs_options="obfs=$obfs_type"
[ -z "$obfs_host" ] || obfs_options="$obfs_options;obfs-host=$obfs_host"
[ -z "$obfs_uri" ] || obfs_options="$obfs_options;obfs-uri=$obfs_uri"
[ -z "$timeout" ] || obfs_options="$obfs_options;t=$timeout"
cat <<-EOF
${obfs:+${q}plugin${q}: ${q}/usr/bin/obfs-local${q},${q}plugin_opts${q}: ${q}$obfs_options${q},}
EOF
fi
if [ "$obfs_plugin" = "v2ray" ]; then
obfs_options="loglevel=default"
[ "$obfs_type" = "tls" ] && obfs_options="tls"
[ -z "$obfs_host" ] || obfs_options="$obfs_options;host=$obfs_host"
[ -z "$obfs_uri" ] || obfs_options="$obfs_options;path=$obfs_uri"
[ "$fast_open" = true ] && obfs_options="$obfs_options;fast-open"
cat <<-EOF
${obfs:+${q}plugin${q}: ${q}/usr/bin/v2ray-plugin${q},${q}plugin_opts${q}: ${q}$obfs_options${q},}
EOF
fi
fi
} }
ss_xxx() { ss_xxx() {
@ -210,25 +82,33 @@ ss_xxx() {
[ -x "$bin" ] || return [ -x "$bin" ] || return
eval "$("validate_${cfgtype}_section" "$cfg" ss_validate_mklocal)" eval "$("validate_${cfgtype}_section" "$cfg" ss_validate_mklocal)"
"validate_${cfgtype}_section" "$cfg" || return 1 "validate_${cfgtype}_section" "$cfg" || return
[ "$disabled" = 0 ] || return [ "$disabled" = 0 ] || return
if ss_mkjson \ json_init
ss_mkjson_common_conf \ ss_mkjson_${cfgtype}_conf || return
ss_mkjson_${cfgtype}_conf \ json_add_boolean use_syslog 1
; then json_add_boolean ipv6_first "$ipv6_first"
json_add_boolean fast_open "$fast_open"
json_add_boolean reuse_port "$reuse_port"
json_add_boolean no_delay "$no_delay"
json_add_boolean mptcp "$mptcp"
[ -z "$local_address" ] || json_add_string local_address "$local_address"
[ -z "$local_port" ] || json_add_int local_port "$local_port"
[ -z "$mode" ] || json_add_string mode "$mode"
[ -z "$mtu" ] || json_add_int mtu "$mtu"
[ -z "$timeout" ] || json_add_int timeout "$timeout"
[ -z "$user" ] || json_add_string user "$user"
json_dump -i >"$confjson"
procd_open_instance "$cfgtype.$cfg" procd_open_instance "$cfgtype.$cfg"
procd_set_param command "$bin" -c "$confjson" procd_set_param command "$bin" -c "$confjson"
[ "$verbose" = 0 ] || procd_append_param command -v [ "$verbose" = 0 ] || procd_append_param command -v
[ "$no_delay" = 0 ] || procd_append_param command --no-delay
[ -z "$bind_address" ] || procd_append_param command -b "$bind_address" [ -z "$bind_address" ] || procd_append_param command -b "$bind_address"
[ -z "$manager_address" ] || procd_append_param command --manager-address "$manager_address"
procd_set_param file "$confjson" procd_set_param file "$confjson"
procd_set_param limits nofile="512000 512000"
procd_set_param respawn procd_set_param respawn
procd_close_instance procd_close_instance
ss_rules_cb ss_rules_cb
fi
} }
ss_rules_restart() { ss_rules_restart() {
@ -242,17 +122,16 @@ ss_rules_restart() {
ss_rules_cb() { ss_rules_cb() {
local cfgserver server local cfgserver server
if [ "$cfgtype" = ss_redir ]; then if [ "$cfgtype" = ss_redir ]; then
config_get cfgserver "$cfg" server config_get cfgserver "$cfg" server
config_get server "$cfgserver" server config_get server "$cfgserver" server
ss_redir_servers="$ss_redir_servers $server" ss_redir_servers="$ss_redir_servers $server"
if [ "$mode" = "tcp_only" -o "$mode" = "tcp_and_udp" ]; then if [ "$mode" = tcp_only -o "$mode" = "tcp_and_udp" ]; then
eval "ss_rules_redir_tcp_$cfg=$local_port" eval "ss_rules_redir_tcp_$cfg=$local_port"
eval "ss_rules6_redir_tcp_$cfg=$local_port"
fi fi
if [ "$mode" = "udp_only" -o "$mode" = "tcp_and_udp" ]; then if [ "$mode" = udp_only -o "$mode" = "tcp_and_udp" ]; then
eval "ss_rules_redir_udp_$cfg=$local_port" eval "ss_rules_redir_udp_$cfg=$local_port"
eval "ss_rules6_redir_udp_$cfg=$local_port"
fi fi
fi fi
} }
@ -263,79 +142,31 @@ ss_rules() {
local cfgtype local cfgtype
local local_port_tcp local_port_udp local local_port_tcp local_port_udp
local args local args
local ss_redir_servers4 dst_ips_bypass4 dst_ips_forward4 src_ips_bypass4 src_ips_forward4 src_ips_checkdst4
[ -x "$bin" ] || return 1 [ -x "$bin" ] || return 1
"$bin" -f
"$bin" -6 -f
config_get cfgtype "$cfg" TYPE config_get cfgtype "$cfg" TYPE
[ "$cfgtype" = ss_rules ] || return 1 [ "$cfgtype" = ss_rules ] || return 1
eval "$(validate_ss_rules_section "$cfg" ss_validate_mklocal)" eval "$(validate_ss_rules_section "$cfg" ss_validate_mklocal)"
validate_ss_rules_section "$cfg" || return 1 validate_ss_rules_section "$cfg" || return 1
[ "$disabled" = 0 ] || return 1 [ "$disabled" = 0 ] || return 0
eval local_port_tcp="\$ss_rules_redir_tcp_$redir_tcp" eval local_port_tcp="\$ss_rules_redir_tcp_$redir_tcp"
eval local_port_udp="\$ss_rules_redir_udp_$redir_udp" eval local_port_udp="\$ss_rules_redir_udp_$redir_udp"
[ -n "$local_port_tcp" -o -n "$local_port_udp" ] || return 1 [ -n "$local_port_tcp" -o -n "$local_port_udp" ] || return 1
ss_redir_servers4="$(echo "$ss_redir_servers" | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort -u)" ss_redir_servers="$(echo "$ss_redir_servers" | tr ' ' '\n' | sort -u)"
[ "$dst_forward_recentrst" = 0 ] || args="$args --dst-forward-recentrst" [ "$dst_forward_recentrst" = 0 ] || args="$args --dst-forward-recentrst"
dst_ips_bypass4="$(echo "$dst_ips_bypass" | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort -u)" ss_rules_call
dst_ips_forward4="$(echo "$dst_ips_forward" | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort -u)" ss_rules_call -6
src_ips_bypass4="$(echo "$src_ips_bypass" | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort -u)"
src_ips_forward4="$(echo "$src_ips_forward" | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort -u)"
src_ips_checkdst4="$(echo "$src_ips_checkdst" | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort -u)"
"$bin" \
-s "$ss_redir_servers4" \
-l "$local_port_tcp" \
-L "$local_port_udp" \
--src-default "$src_default" \
--dst-default "$dst_default" \
--local-default "$local_default" \
--dst-bypass-file "$dst_ips_bypass_file" \
--dst-forward-file "$dst_ips_forward_file" \
--dst-bypass "$dst_ips_bypass4" \
--dst-forward "$dst_ips_forward4" \
--src-bypass "$src_ips_bypass4" \
--src-forward "$src_ips_forward4" \
--src-checkdst "$src_ips_checkdst4" \
--ifnames "$ifnames" \
--ipt-extra "$ipt_args" \
$args \
|| "$bin" -f
} }
ss_rules6() { ss_rules_call() {
local cfg="ss_rules" "$bin" "$@" \
local bin="$ss_bindir/ss-rules6" -s "$ss_redir_servers" \
local cfgtype
local local_port_tcp local_port_udp
local args
local ss_redir_servers6 dst_ips_bypass6 dst_ips_forward6 src_ips_bypass6 src_ips_forward6 src_ips_checkdst6
[ -x "$bin" ] || return 1
config_get cfgtype "$cfg" TYPE
[ "$cfgtype" = ss_rules ] || return 1
eval "$(validate_ss_rules_section "$cfg" ss_validate_mklocal)"
validate_ss_rules_section "$cfg" || return 1
[ "$disabled" = 0 ] || return 1
eval local_port_tcp="\$ss_rules6_redir_tcp_$redir_tcp"
eval local_port_udp="\$ss_rules6_redir_udp_$redir_udp"
[ -n "$local_port_tcp" -o -n "$local_port_udp" ] || return 1
ss_redir_servers6="$(echo "$ss_redir_servers" | grep -o '\([0-9a-fA-F]\{0,4\}:\)\{1,7\}[0-9a-fA-F]\{0,4\}' | sort -u)"
[ "$dst_forward_recentrst" = 0 ] || args="$args --dst-forward-recentrst"
dst_ips_bypass6="$(echo "$dst_ips_bypass" | grep -o '\([0-9a-fA-F]\{0,4\}:\)\{1,7\}[0-9a-fA-F]\{0,4\}' | sort -u)"
dst_ips_forward6="$(echo "$dst_ips_forward" | grep -o '\([0-9a-fA-F]\{0,4\}:\)\{1,7\}[0-9a-fA-F]\{0,4\}' | sort -u)"
src_ips_bypass6="$(echo "$src_ips_bypass" | grep -o '\([0-9a-fA-F]\{0,4\}:\)\{1,7\}[0-9a-fA-F]\{0,4\}' | sort -u)"
src_ips_forward6="$(echo "$src_ips_forward" | grep -o '\([0-9a-fA-F]\{0,4\}:\)\{1,7\}[0-9a-fA-F]\{0,4\}' | sort -u)"
src_ips_checkdst6="$(echo "$src_ips_checkdst" | grep -o '\([0-9a-fA-F]\{0,4\}:\)\{1,7\}[0-9a-fA-F]\{0,4\}' | sort -u)"
"$bin" \
-s "$ss_redir_servers6" \
-l "$local_port_tcp" \ -l "$local_port_tcp" \
-L "$local_port_udp" \ -L "$local_port_udp" \
--src-default "$src_default" \ --src-default "$src_default" \
@ -343,15 +174,15 @@ ss_rules6() {
--local-default "$local_default" \ --local-default "$local_default" \
--dst-bypass-file "$dst_ips_bypass_file" \ --dst-bypass-file "$dst_ips_bypass_file" \
--dst-forward-file "$dst_ips_forward_file" \ --dst-forward-file "$dst_ips_forward_file" \
--dst-bypass "$dst_ips_bypass6" \ --dst-bypass "$dst_ips_bypass" \
--dst-forward "$dst_ips_forward6" \ --dst-forward "$dst_ips_forward" \
--src-bypass "$src_ips_bypass6" \ --src-bypass "$src_ips_bypass" \
--src-forward "$src_ips_forward6" \ --src-forward "$src_ips_forward" \
--src-checkdst "$src_ips_checkdst6" \ --src-checkdst "$src_ips_checkdst" \
--ifnames "$ifnames" \ --ifnames "$ifnames" \
--ipt-extra "$ipt_args" \ --ipt-extra "$ipt_args" \
$args \ $args \
|| "$bin" -f || "$bin" "$@" -f
} }
start_service() { start_service() {
@ -362,19 +193,17 @@ start_service() {
for cfgtype in ss_local ss_redir ss_server ss_tunnel; do for cfgtype in ss_local ss_redir ss_server ss_tunnel; do
config_foreach ss_xxx "$cfgtype" "$cfgtype" config_foreach ss_xxx "$cfgtype" "$cfgtype"
done done
rules_up ss_rules
# Add rule to match traffic marked by firewall for bypass
ip rule add prio 1 fwmark 0x539 lookup 991337 > /dev/null 2>&1
} }
stop_service() { stop_service() {
rules_down local bin="$ss_bindir/ss-rules"
rm -rf "$ss_confdir"
}
reload_service() { [ -x "$bin" ] && {
stop "$bin" -f
start "$bin" -6 -f
}
rm -rf "$ss_confdir"
} }
rules_exist() { rules_exist() {
@ -407,9 +236,8 @@ rules_down() {
[ -x "$bin6" ] && "$bin6" -f >/dev/null 2>&1 [ -x "$bin6" ] && "$bin6" -f >/dev/null 2>&1
} }
service_triggers() { service_triggers() {
procd_add_reload_interface_trigger wan* procd_add_reload_interface_trigger wan
procd_add_reload_trigger shadowsocks-libev procd_add_reload_trigger shadowsocks-libev
procd_open_validate procd_open_validate
validate_server_section validate_server_section
@ -439,7 +267,7 @@ validate_common_server_options_() {
local cfgtype="$1"; shift local cfgtype="$1"; shift
local cfg="$1"; shift local cfg="$1"; shift
local func="$1"; shift local func="$1"; shift
local stream_methods='"none", "table", "rc4", "rc4-md5", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "bf-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "salsa20", "chacha20", "chacha20-ietf"' local stream_methods='"table", "rc4", "rc4-md5", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "bf-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "salsa20", "chacha20", "chacha20-ietf"'
local aead_methods='"aes-128-gcm", "aes-192-gcm", "aes-256-gcm", "chacha20-ietf-poly1305", "xchacha20-ietf-poly1305"' local aead_methods='"aes-128-gcm", "aes-192-gcm", "aes-256-gcm", "chacha20-ietf-poly1305", "xchacha20-ietf-poly1305"'
"${func:-ss_validate}" "$cfgtype" "$cfg" "$@" \ "${func:-ss_validate}" "$cfgtype" "$cfg" "$@" \
@ -448,7 +276,12 @@ validate_common_server_options_() {
'server_port:port' \ 'server_port:port' \
'password:string' \ 'password:string' \
'key:string' \ 'key:string' \
"method:or($stream_methods, $aead_methods)" "method:or($stream_methods, $aead_methods)" \
'plugin:string' \
'plugin_opts:string' \
'obfs:bool:0' \
'obfs_plugin:or("v2ray","obfs-simple"):v2ray' \
'obfs_type:or("http","tls"):http'
} }
validate_common_client_options_() { validate_common_client_options_() {
@ -468,36 +301,25 @@ validate_common_options_() {
'fast_open:bool:0' \ 'fast_open:bool:0' \
'ipv6_first:bool:0' \ 'ipv6_first:bool:0' \
'no_delay:bool:0' \ 'no_delay:bool:0' \
'reuse_port:bool:0' \
'mptcp:bool:0' \ 'mptcp:bool:0' \
'ebpf:bool:0' \ 'reuse_port:bool:0' \
'verbose:bool:0' \ 'verbose:bool:0' \
'mode:or("tcp_only", "udp_only", "tcp_and_udp"):tcp_only' \ 'mode:or("tcp_only", "udp_only", "tcp_and_udp"):tcp_only' \
'mtu:uinteger' \ 'mtu:uinteger' \
'timeout:uinteger' \ 'timeout:uinteger' \
'user:string' \ 'user:string'
'obfs:bool:0' \
'obfs_plugin:or("v2ray","obfs-simple"):v2ray' \
'obfs_type:or("http","tls"):http'
} }
validate_server_section() { validate_server_section() {
validate_common_server_options_ server "$1" "${2}" validate_common_server_options_ server "$1" "$2"
} }
validate_ss_local_section() { validate_ss_local_section() {
validate_common_client_options_ ss_local "$1" \ validate_common_client_options_ ss_local "$1" "$2"
"${2}" \
'obfs_host:string' \
'obfs_uri:string'
} }
validate_ss_redir_section() { validate_ss_redir_section() {
validate_common_client_options_ ss_redir "$1" \ validate_common_client_options_ ss_redir "$1" "$2"
"${2}" \
'disable_sni:bool:0' \
'obfs_host:string' \
'obfs_uri:string'
} }
validate_ss_rules_section() { validate_ss_rules_section() {
@ -505,13 +327,13 @@ validate_ss_rules_section() {
'disabled:bool:0' \ 'disabled:bool:0' \
'redir_tcp:uci("shadowsocks-libev", "@ss_redir")' \ 'redir_tcp:uci("shadowsocks-libev", "@ss_redir")' \
'redir_udp:uci("shadowsocks-libev", "@ss_redir")' \ 'redir_udp:uci("shadowsocks-libev", "@ss_redir")' \
'src_ips_bypass:or(ip4addr,cidr4,ip6addr,cidr6)' \ 'src_ips_bypass:or(ipaddr,cidr)' \
'src_ips_forward:or(ip4addr,cidr4,ip6addr,cidr6)' \ 'src_ips_forward:or(ipaddr,cidr)' \
'src_ips_checkdst:or(ip4addr,cidr4,ip6addr,cidr6)' \ 'src_ips_checkdst:or(ipaddr,cidr)' \
'dst_ips_bypass_file:file' \ 'dst_ips_bypass_file:file' \
'dst_ips_bypass:or(ip4addr,cidr4,ip6addr,cidr6)' \ 'dst_ips_bypass:or(ipaddr,cidr)' \
'dst_ips_forward_file:file' \ 'dst_ips_forward_file:file' \
'dst_ips_forward:or(ip4addr,cidr4,ip6addr,cidr6)' \ 'dst_ips_forward:or(ipaddr,cidr)' \
'src_default:or("bypass", "forward", "checkdst"):checkdst' \ 'src_default:or("bypass", "forward", "checkdst"):checkdst' \
'dst_default:or("bypass", "forward"):bypass' \ 'dst_default:or("bypass", "forward"):bypass' \
'local_default:or("bypass", "forward", "checkdst"):bypass' \ 'local_default:or("bypass", "forward", "checkdst"):bypass' \
@ -523,13 +345,12 @@ validate_ss_rules_section() {
validate_ss_server_section() { validate_ss_server_section() {
validate_common_server_options_ ss_server "$1" \ validate_common_server_options_ ss_server "$1" \
validate_common_options_ \ validate_common_options_ \
"${2}" \ "$2" \
'bind_address:ipaddr' \ 'bind_address:ipaddr'
'manager_address:host'
} }
validate_ss_tunnel_section() { validate_ss_tunnel_section() {
validate_common_client_options_ ss_tunnel "$1" \ validate_common_client_options_ ss_tunnel "$1" \
"${2}" \ "$2" \
'tunnel_address:regex(".+\:[0-9]+")' 'tunnel_address:regex(".+\:[0-9]+")'
} }