mirror of
https://github.com/ehang-io/nps.git
synced 2026-11-01 01:02:12 +08:00
Https error
This commit is contained in:
1 parent
6a978515ca
commit
4a7a0a7b75
1 file changed
+3
@@ -165,6 +165,9 @@ func GetServerNameFromClientHello(c net.Conn) (string, []byte) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", nil
|
return "", nil
|
||||||
}
|
}
|
||||||
|
if n < 42 {
|
||||||
|
return "", nil
|
||||||
|
}
|
||||||
copy(data, buf[:n])
|
copy(data, buf[:n])
|
||||||
clientHello := new(crypt.ClientHelloMsg)
|
clientHello := new(crypt.ClientHelloMsg)
|
||||||
clientHello.Unmarshal(data[5:n])
|
clientHello.Unmarshal(data[5:n])
|
||||||
|
|||||||
Reference in new issue
Block a user