fn peek_draft(buf: &[u8], side: ProxySide) -> DraftPeekExpand description
Try to name the concrete draft by peeking at the first SETUP message on a control stream.
- On the
ClientToProxydirection, looks at CLIENT_SETUP’ssupported_versionslist and returns the highest draft in the 07–14 range we support. - On the
RelayToProxydirection, looks at SERVER_SETUP’sselected_versionand returns the matching draft. - For draft-15+ the SETUP carries no version, but those cases don’t reach this function because the caller only invokes it when the draft isn’t already fixed by ALPN.