增加防探测功能,增加流量加密功能

This commit is contained in:
wenyifan
2022-09-09 15:29:41 +08:00
parent c2ab6cbe5f
commit a064f72104
12 changed files with 185 additions and 79 deletions

View File

@ -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 {