Expand description
Zero-copy QUIC Initial packet parser with optional payload decryption.
This crate provides three layers of functionality:
Layer 1 — Header parsing (always available, zero dependencies beyond thiserror):
parse QUIC Initial packet headers, peek at connection IDs, and decode varints.
Layer 2 — Decryption (requires ring or aws-lc-rs feature):
derive keys and decrypt Initial packet payloads for QUIC v1 and v2.
Layer 3 — Frame extraction (requires ring or aws-lc-rs feature):
extract CRYPTO frames from decrypted payloads and reassemble them into a
contiguous byte stream suitable for TLS ClientHello parsing.
Structs§
- Crypto
Frame - A single CRYPTO frame extracted from decrypted QUIC payload.
- Initial
Header - Parsed QUIC Initial packet header with zero-copy references into the original packet buffer.
Enums§
- Error
- Errors that can occur during QUIC packet parsing and decryption.
Functions§
- decrypt_
initial - Decrypt a QUIC Initial packet payload.
- parse_
crypto_ frames - Parse all CRYPTO frames from a decrypted Initial packet payload.
- parse_
initial - Parse a QUIC Long Header Initial packet from a raw datagram.
- peek_
long_ header_ dcid - Extract the Destination Connection ID from a QUIC Long Header packet without performing a full parse.
- peek_
short_ header_ dcid - Extract the Destination Connection ID from a QUIC Short Header packet.
- read_
varint - Decode a QUIC variable-length integer from the start of
buf. - reassemble_
crypto_ stream - Reassemble CRYPTO frames into a contiguous byte stream.