From 2aa8bacdabbb01200c41589751af26d8255bdf17 Mon Sep 17 00:00:00 2001 From: Dennis Date: Sat, 21 Oct 2017 03:12:28 +0800 Subject: [PATCH] someone --- .../luasrc/model/cbi/shadowsocksr.lua | 5 ++++- .../lean/luci-app-shadowsocksr-pro/root/etc/init.d/ssrpro | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package/lean/luci-app-shadowsocksr-pro/luasrc/model/cbi/shadowsocksr.lua b/package/lean/luci-app-shadowsocksr-pro/luasrc/model/cbi/shadowsocksr.lua index bac488c56..a04b42bfd 100644 --- a/package/lean/luci-app-shadowsocksr-pro/luasrc/model/cbi/shadowsocksr.lua +++ b/package/lean/luci-app-shadowsocksr-pro/luasrc/model/cbi/shadowsocksr.lua @@ -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")) diff --git a/package/lean/luci-app-shadowsocksr-pro/root/etc/init.d/ssrpro b/package/lean/luci-app-shadowsocksr-pro/root/etc/init.d/ssrpro index 2db51a464..224279856 100755 --- a/package/lean/luci-app-shadowsocksr-pro/root/etc/init.d/ssrpro +++ b/package/lean/luci-app-shadowsocksr-pro/root/etc/init.d/ssrpro @@ -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