mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 16:24:03 +03:00
Add base faketls processing
This commit is contained in:
@@ -7,12 +7,27 @@ const (
|
||||
|
||||
ClientHelloRandomOffset = 6
|
||||
ClientHelloSessionIDOffset = ClientHelloRandomOffset + RandomLen
|
||||
ClientHelloMinLen = ClientHelloSessionIDOffset + 1
|
||||
ClientHelloMinLen = ClientHelloSessionIDOffset + 1
|
||||
|
||||
WelcomePacketRandomOffset = 11
|
||||
|
||||
HandshakeTypeClient = 0x01
|
||||
HandshakeTypeServer = 0x02
|
||||
)
|
||||
|
||||
var (
|
||||
ErrBadDigest = errors.New("bad digest")
|
||||
ErrAntiReplayAttack = errors.New("antireplay attack was detected")
|
||||
|
||||
serverHelloSuffix = []byte{
|
||||
0x00, // no compression
|
||||
0x00, 0x2e, // 46 bytes of data
|
||||
0x00, 0x2b, // Extension - Supported Versions
|
||||
0x00, 0x02, // 2 bytes are following
|
||||
0x03, 0x04, // TLS 1.3
|
||||
0x00, 0x33, // Extension - Key Share
|
||||
0x00, 0x24, // 36 bytes
|
||||
0x00, 0x1d, // x25519 curve
|
||||
0x00, 0x20, // 32 bytes of key
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user