From 4a7a0a7b75182c0d2c82cdc63e6eb2b4aedc8546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B2=B3?= Date: Wed, 17 Apr 2019 14:17:59 +0800 Subject: [PATCH] Https error --- server/proxy/https.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/proxy/https.go b/server/proxy/https.go index 72f42e2..7fc3ee9 100644 --- a/server/proxy/https.go +++ b/server/proxy/https.go @@ -165,6 +165,9 @@ func GetServerNameFromClientHello(c net.Conn) (string, []byte) { if err != nil { return "", nil } + if n < 42 { + return "", nil + } copy(data, buf[:n]) clientHello := new(crypt.ClientHelloMsg) clientHello.Unmarshal(data[5:n])