Skip to content

Commit 5d7a1a5

Browse files
chore: update changelog for version 1.60.2 and add QUIC packet recognition improvements
1 parent 92b41a6 commit 5d7a1a5

3 files changed

Lines changed: 27 additions & 1 deletion

File tree

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# B4 - Bye Bye Big Bro
22

3+
## [1.60.2] - 2026-05-xx
4+
5+
- FIXED: **QUIC blocking sometimes does not work for YouTube on phones** - newer Chrome versions on Android use a QUIC variant b4 didn't recognize, so "block all QUIC" let those packets through and YouTube kept working in the browser. b4 now recognizes any QUIC packet, current or future.
6+
37
## [1.60.1] - 2026-05-02
48

59
- ADDED: **Per-set strategy escalation** - each set now has an "Escalation" tab with an "Escalate to" dropdown. Pick another set as the failover target: if the current set keeps failing for a destination, b4 switches that destination to the chosen set on the next connection. Tracking is per-hostname, so a problem with one site does not affect others that happen to share the same server IP. How quickly to escalate and how long to keep the switch are configurable per set (defaults: an hour, then retry). Lets you chain several strategies instead of giving up after the first one fails.

src/nfq/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ func (w *Worker) handleUDPPacket(q *nfqueue.Nfqueue, id uint32, pkt *pktInfo, cf
606606

607607
isSTUN = stun.IsSTUNMessage(payload)
608608

609-
isQUIC := quic.IsInitial(payload)
609+
isQUIC := quic.LooksLikeQUIC(payload)
610610

611611
if host == "" && isQUIC {
612612
if h, ok := sni.ParseQUICClientHelloSNI(payload); ok {

src/quic/initial.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,28 @@ func IsInitial(b []byte) bool {
4747
}
4848
}
4949

50+
func LooksLikeQUIC(b []byte) bool {
51+
if len(b) < 7 || b[0]&longHdrBit == 0 {
52+
return false
53+
}
54+
off := 1 + 4
55+
if len(b) < off+1 {
56+
return false
57+
}
58+
dlen := int(b[off])
59+
off++
60+
if dlen > 20 || len(b) < off+dlen+1 {
61+
return false
62+
}
63+
off += dlen
64+
slen := int(b[off])
65+
off++
66+
if slen > 20 || len(b) < off+slen {
67+
return false
68+
}
69+
return true
70+
}
71+
5072
func DecryptInitial(dcid, packet []byte) ([]byte, bool) {
5173
if len(packet) < 7 || packet[0]&0x80 == 0 {
5274
return nil, false

0 commit comments

Comments
 (0)