1
0
刘河 6 жил өмнө
parent
commit
4a7a0a7b75
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      server/proxy/https.go

+ 3 - 0
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])