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])