From 6f6261edc4d38100ccf77716079a9e89553f089e Mon Sep 17 00:00:00 2001 From: zhengyu Date: Mon, 19 Aug 2019 11:25:50 +0800 Subject: [PATCH] =?UTF-8?q?kcp,=20tls=20and=20unix=20are=20transport=20pro?= =?UTF-8?q?tocols=EF=BC=8Conly=20used=20with=20one=20proxy=20protocol,=20i?= =?UTF-8?q?f=20there=20are=20more=20than=202=20protocols=20in=20the=20list?= =?UTF-8?q?en,=20it=20will=20cause=20trouble.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proxy/kcp/kcp.go | 2 +- proxy/tls/tls.go | 2 +- proxy/unix/unix.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/proxy/kcp/kcp.go b/proxy/kcp/kcp.go index 1123f74..54b354e 100644 --- a/proxy/kcp/kcp.go +++ b/proxy/kcp/kcp.go @@ -133,7 +133,7 @@ func NewKCPServer(s string, dialer proxy.Dialer) (proxy.Server, error) { // prepare transport listener // TODO: check here - if len(transport) < 2 { + if len(transport) != 2 { return nil, errors.New("[kcp] malformd listener:" + s) } diff --git a/proxy/tls/tls.go b/proxy/tls/tls.go index e795e27..8b8b298 100644 --- a/proxy/tls/tls.go +++ b/proxy/tls/tls.go @@ -92,7 +92,7 @@ func NewTLSServer(s string, dialer proxy.Dialer) (proxy.Server, error) { // prepare transport listener // TODO: check here - if len(transport) < 2 { + if len(transport) != 2 { return nil, errors.New("[tls] malformd listener:" + s) } diff --git a/proxy/unix/unix.go b/proxy/unix/unix.go index 0a43e62..c220841 100644 --- a/proxy/unix/unix.go +++ b/proxy/unix/unix.go @@ -51,7 +51,7 @@ func NewUnixServer(s string, dialer proxy.Dialer) (proxy.Server, error) { // prepare transport listener // TODO: check here - if len(transport) < 2 { + if len(transport) != 2 { return nil, errors.New("[unix] malformd listener:" + s) }