mirror of
https://github.com/DanielLavrushin/b4.git
synced 2026-07-09 16:00:05 +00:00
fix: correct long header bitmasking in QUIC initial packet validation
This commit is contained in:
parent
927df1efaf
commit
343f44be62
2 changed files with 4 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# B4 - Bye Bye Big Bro
|
||||
|
||||
## [1.61.0] - 2026-05-xx
|
||||
## [1.61.0] - 2026-05-09
|
||||
|
||||
- ADDED: **Custom payload for UDP fake packets** - new "Fake Packet Payload" picker in the UDP fake settings of each set. Choose a captured `.bin` (uploaded in Settings → Payloads, or auto-captured from live QUIC traffic) to use as the body of fake UDP packets. Empty = zero fill (previous behavior). The Settings → Payloads upload form now has an explicit TLS/QUIC protocol selector.
|
||||
- ADDED: **Auto-generated QUIC Initial payload** - new "(auto: QUIC Initial)" option in the UDP Fake Packet Payload picker. b4 generates a fresh randomized QUIC Initial packet for every fake, with random connection IDs each time, so no upload is needed and the bytes can't be fingerprinted by repetition. Recommended packet size for this mode is 1200 bytes. Works with any Faking Strategy (None / TTL / Checksum).
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ const (
|
|||
)
|
||||
|
||||
const (
|
||||
longHdrBit = 0x80
|
||||
longHdrBit = 0x80
|
||||
longHdrMask = 0xC0
|
||||
)
|
||||
|
||||
func IsInitial(b []byte) bool {
|
||||
|
|
@ -48,7 +49,7 @@ func IsInitial(b []byte) bool {
|
|||
}
|
||||
|
||||
func LooksLikeQUIC(b []byte) bool {
|
||||
if len(b) < 7 || b[0]&longHdrBit == 0 {
|
||||
if len(b) < 7 || b[0]&longHdrMask != longHdrMask {
|
||||
return false
|
||||
}
|
||||
off := 1 + 4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue