Merge pull request #132 from tossp/someone

Add Protocol Param to SSR Pro
This commit is contained in:
coolsnowwolf 2017-10-21 11:12:55 +08:00 committed by GitHub
commit 066cddb3a9
3 changed files with 9 additions and 2 deletions

View File

@ -125,6 +125,10 @@ protocol:value("auth_chain_d")
protocol:value("auth_chain_e")
protocol:value("auth_chain_f")
protoparam = s:taboption("main",Value, "protoparam", translate("Protocol Param"))
protoparam.optional = true
protoparam.rmempty = true
obfs = s:taboption("main",ListValue, "obfs", translate("Obfs Param"))
obfs:value("plain")
obfs:value("http_simple")
@ -142,7 +146,6 @@ plugin_param:depends("obfs", "tls1.2_ticket_fastauth")
obfs_param = s:taboption("main",Value, "obfs_param", translate("Confusing plug-in parameters"))
obfs_param.rmempty = true
obfs_param.datatype = "host"
obfs_param:depends("plugin_param", "1")
s:tab("list", translate("User-defined GFW-List"))

View File

@ -58,6 +58,9 @@ msgstr "加密"
msgid "Protocol"
msgstr "协议"
msgid "Protocol Param"
msgstr "协议参数"
msgid "Obfs Param"
msgstr "混淆"

View File

@ -43,6 +43,7 @@ start()
local vt_password=`uci get shadowsocksr.@shadowsocksr[0].password 2>/dev/null`
local vt_method=`uci get shadowsocksr.@shadowsocksr[0].method`
local vt_protocol=`uci get shadowsocksr.@shadowsocksr[0].protocol`
local vt_protoparam=`uci get shadowsocksr.@shadowsocksr[0].protoparam 2>/dev/null`
local vt_obfs=`uci get shadowsocksr.@shadowsocksr[0].obfs`
local vt_timeout=`uci get shadowsocksr.@shadowsocksr[0].timeout 2>/dev/null`
local vt_safe_dns=`uci get shadowsocksr.@shadowsocksr[0].safe_dns 2>/dev/null`
@ -89,7 +90,7 @@ start()
"local_port": $SS_REDIR_PORT,
"timeout": $vt_timeout,
"protocol": "$vt_protocol",
"protocol_param": "",
"protocol_param": "$vt_protoparam",
"obfs": "$vt_obfs",
"obfs_param": "$obfs_param",
"fast_open": false