mirror of
https://github.com/ValdikSS/GoodbyeDPI.git
synced 2024-12-22 14:26:08 +00:00
Check TLS Handshake ClientHello byte if packet length is enough
This commit is contained in:
parent
372cc6a45d
commit
7f59593a28
@ -1076,7 +1076,13 @@ int main(int argc, char *argv[]) {
|
||||
(do_fake_packet || do_native_frag)
|
||||
)
|
||||
{
|
||||
if (packet_dataLen >=2 && memcmp(packet_data, "\x16\x03", 2) == 0) {
|
||||
/**
|
||||
* In case of Window Size fragmentation=2, we'll receive only 2 byte packet.
|
||||
* But if the packet is more than 2 bytes, check ClientHello byte.
|
||||
*/
|
||||
if ((packet_dataLen == 2 && memcmp(packet_data, "\x16\x03", 2) == 0) ||
|
||||
(packet_dataLen >= 3 && memcmp(packet_data, "\x16\x03\x01", 3) == 0))
|
||||
{
|
||||
if (do_blacklist
|
||||
? (extract_sni(packet_data, packet_dataLen,
|
||||
&host_addr, &host_len) &&
|
||||
|
Loading…
Reference in New Issue
Block a user