mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 20:20:53 +03:00
nfqws: QUIC check fixed bit = 1
This commit is contained in:
parent
2eec88c2bf
commit
1111845590
@ -525,9 +525,9 @@ bool QUICExtractHostFromInitial(const uint8_t *data, size_t data_len, char *host
|
||||
bool IsQUICInitial(const uint8_t *data, size_t len)
|
||||
{
|
||||
// too small packets are not likely to be initials with client hello
|
||||
if (len < 256) return false;
|
||||
// long header, fixed bit
|
||||
if (len < 256 || (data[0] & 0xC0)!=0xC0) return false;
|
||||
|
||||
// this also ensures long header
|
||||
uint32_t ver = QUICExtractVersion(data,len);
|
||||
if (QUICDraftVersion(ver) < 11) return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user