Expand description
Quinn WebTransport RPC plane — moq M1 (#151).
A second backend for the transport-generic RPC core (see
super::rpc_session), proving the RPC plane is transport-pluggable: the
exact same Cap’n Proto bidi wire protocol, DoS bounds, graceful-drain, and
error-envelope semantics run over quinn’s [web_transport_quinn::Session]
instead of iroh’s.
QuinnRpcServer— accepts WebTransport sessions on a quinn endpoint and runsserve_rpc_connectionper session.QuinnTransport— client transport wrappingSessionRpcTransport<web_transport_quinn::Session>.
Unlike the iroh substrate (which terminates raw QUIC bidi streams under a
custom ALPN), web-transport-quinn speaks the full WebTransport handshake
(HTTP/3 CONNECT, ALPN h3). The wire framing inside each bidi stream is
identical, so the generic core is reused unchanged.
Structs§
- Quinn
RpcServer - A quinn-backed WebTransport server for the RPC plane.
- Quinn
Transport - Wraps a quinn [
web_transport_quinn::Session] as aTransportfor RPC plane traffic. Delegates to the transport-genericSessionRpcTransport.
Traits§
- NineP
WtHandler - Serves one 9P session over a WebTransport bidi stream (H1b / #765).
- NineP
WtStream - A WebTransport bidi stream carrying a 9P2000.L session, erased to a byte
stream. The H1b
/9parm hands one of these to the injectedNinePWtHandler; the handler runs the transport-agnosticTranslator::serve_connectioncore over it (the same core H1a’s WebSocket pump feeds). Blanket-implemented for anyAsyncRead + AsyncWritebyte stream (a joined WT send/recv pair).
Functions§
- cert_
sha256 - SHA-256 fingerprint of a DER-encoded certificate, as 32 raw bytes — the
cert-hash pin used in
QuicServerAuth, the DID-doc#quicentry, and theStreamInfo.reachQuic option (#274). The fingerprint is public material. - connect_
pinned - Convenience: pin by the full server cert DER (hashes it for you). Used by tests and callers that hold the cert rather than its fingerprint.
- connect_
pinned_ hashes - Build a quinn WebTransport client session against a self-signed server,
accepting the leaf cert if its SHA-256 fingerprint is any of
cert_hashes(QuicServerAuth::accept_cert_hashes— a set so rotation can overlap). Hermetic: dials an IP-literal URL so no DNS lookup or network egress occurs. - connect_
pinned_ hashes_ path - Build a quinn WebTransport client session against a self-signed server at an
explicit URL path (e.g.
/moqfor the moq plane vs/for RPC), accepting the leaf cert if its SHA-256 is any ofcert_hashes. Hermetic: dials an IP-literal URL so no DNS lookup occurs. Mirrorsconnect_pinned_hashesbut lets the caller select the path the server path-dispatches on (#274). - connect_
pinned_ hashes_ path_ with_ headers connect_pinned_hashes_pathvariant that attaches extra HTTP/3 CONNECT headers to the WebTransport request — used by #1153 to carry theAuthorization: Bearer <jwt>credential the/moqendpoint verifies at CONNECT time. Hermetic: dials an IP-literal URL.- connect_
webpki - Build a quinn WebTransport client session against a server with a CA-issued
certificate, validated via the system root store and the DNS
server_name(QuicServerAuth::web_pki). Dialshttps://{server_name}:{port}/. - connect_
webpki_ path - WebPKI variant of
connect_pinned_hashes_path: validate via the system root store + DNSserver_name, dialing the given URLpath(#274). - global_
moq_ connect_ authz - The process-global
/moqCONNECT authenticator, if one has been registered. - global_
ninep_ handler - The process-global 9P WebTransport handler, if one has been registered.
- set_
global_ moq_ connect_ authz - Register the process-global
/moqCONNECT authenticator (idempotent, first-wins). Thehyprstreamcrate calls this at startup with an [MoqConnectAuthz] built over its PolicyManager subject→tenant map. - set_
global_ ninep_ handler - Register the process-global 9P WebTransport handler (idempotent, first-wins).
Returns
trueif this call installed it,falseif one was already set. - verify_
peer_ cert_ pinned - Verify the peer’s leaf-cert SHA-256 is one of
accept— the post-connect pin check for the WebPKI+pin mode (CA validation runs in the handshake; this adds the pin on top). Call immediately after connect, before any RPC. The cert fingerprint is public, so a plain comparison is fine (no secret to leak).
Type Aliases§
- Quinn
Pending Stream - Re-export the generic stubs under quinn-flavoured names.
- Quinn
Publish Stub