QUIC: add pure-Python long-header helpers + Decoder plugin #153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation: QUIC (RFC 9000) is common on UDP/443. This adds a small, dependency-free core for long-header parsing and a Dshell Decoder that uses it.
What’s included:
dshell/plugins/quic/_helpers.py:
is_quic_long_header()
,parse_quic_long_header()
(returnsQuicLongHeaderMeta
withheader_form="long"
, version, DCID, SCID). Defensive; never raises.tests/test_quic_helpers.py:
3 unit tests (happy-path, non-QUIC rejection, malformed length safety). No external deps → CI-friendly.dshell/plugins/quic/quic.py:
Dshell Decoder that filters UDP ports (default 443;--ports
to override) and writes rows:ts,src,sport,dst,dport,version,dcid,scid,cid_len
.Design notes: Keep helpers import-light so unit tests run on any CI; the Decoder integrates with Dshell’s pipeline and uses the helpers internally.
Local results:
python -m pytest -q tests/test_quic_helpers.py
→ all tests pass.