Https error

pull/103/head
刘河 2019-04-17 14:17:59 +08:00
parent 6a978515ca
commit 4a7a0a7b75
1 changed files with 3 additions and 0 deletions

View File

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