增加防探测功能,增加流量加密功能
This commit is contained in:
@ -31,6 +31,7 @@ type TLSHeader struct {
|
||||
Length int
|
||||
HandshakeType uint8
|
||||
ChangeCipherSpecNext uint8
|
||||
Rand []byte
|
||||
}
|
||||
|
||||
func (t *TLSHeader) toString() string {
|
||||
@ -95,6 +96,9 @@ func ParseAndVerifyTLSHeader(data []byte) *TLSHeader {
|
||||
if header.HandshakeType != ServerHello && header.HandshakeType != ClientHello && header.HandshakeType != Certificate && header.HandshakeType != ServerKeyExchange && header.HandshakeType != ServerHelloDone {
|
||||
header.HandshakeType = EncryptedHandshake
|
||||
}
|
||||
if header.HandshakeType == ClientHello {
|
||||
header.Rand = data[11:43]
|
||||
}
|
||||
}
|
||||
if header.Type == ChangeCipherSpec {
|
||||
if len(data) > 6 {
|
||||
|
Reference in New Issue
Block a user