]> git.kaiwu.me - haproxy.git/commit
REGTESTS: quic: add a Python QUIC client
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 18 Nov 2026 16:36:19 +0000 (17:36 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Wed, 18 Nov 2026 17:00:24 +0000 (18:00 +0100)
commit711e0e740ca8dfa6166119a4d921c7469d0bb652
treecefc3af8c5bb3dbbf5f5ceafeee53c257c02d804
parentf3d7324944e2880770d1f67a7363bee5f3e9451e
REGTESTS: quic: add a Python QUIC client

Replaying some QUIC bugs requires a peer that completes a handshake and
then sends specific frames. Hand-crafted datagrams cannot do that.

Add a minimal QUIC v1 + TLS 1.3 + HTTP/3 client in reg-tests/quic/qclient:

  - qcrypto.py: RFC 9001 packet protection (HKDF, initial keys, varints,
    long and short header protection).

  - qclient.py: a QClient object over a real socket, with the received
    frames exposed. Hooks on the send and handshake paths let a caller
    alter packets, and the helpers cover key updates, connection migration
    and HTTP/3 requests, so tests can drive whatever scenario they need.

Both need the 'cryptography' package. Tests using them will carry
'#REGTEST_EXTRA=qclient' and run only when requested.
reg-tests/quic/qclient/qclient.py [new file with mode: 0644]
reg-tests/quic/qclient/qcrypto.py [new file with mode: 0644]