feat: add WebTransport (HTTP/3) server endpoint for browser clients
Feature-gated behind --features webtransport. Uses h3, h3-quinn, and h3-webtransport crates to accept WebTransport sessions over HTTP/3. Dispatches RPC through the same v2 handler registry as native QUIC, using identical wire framing. - webtransport.rs: H3 connection handling, session management, bidi stream RPC dispatch with auth handshake - Config: --webtransport-listen / QPQ_WEBTRANSPORT_LISTEN - ALPN: "h3" for WebTransport, "capnp" for native QUIC - Also fixes: add missing save/load_revocation_log to SqlStore
This commit is contained in:
@@ -38,6 +38,8 @@ pub struct FileConfig {
|
||||
pub redact_logs: Option<bool>,
|
||||
/// WebSocket JSON-RPC bridge listen address (e.g. "0.0.0.0:9000").
|
||||
pub ws_listen: Option<String>,
|
||||
/// WebTransport (HTTP/3) listen address for browser clients (e.g. "0.0.0.0:7443").
|
||||
pub webtransport_listen: Option<String>,
|
||||
/// Graceful shutdown drain timeout in seconds.
|
||||
pub drain_timeout_secs: Option<u64>,
|
||||
/// Default per-RPC timeout in seconds.
|
||||
@@ -70,6 +72,8 @@ pub struct EffectiveConfig {
|
||||
pub redact_logs: bool,
|
||||
/// WebSocket JSON-RPC bridge listen address. If set, the bridge is started.
|
||||
pub ws_listen: Option<String>,
|
||||
/// WebTransport (HTTP/3) listen address. If set, the WebTransport endpoint is started.
|
||||
pub webtransport_listen: Option<String>,
|
||||
/// Graceful shutdown drain timeout in seconds.
|
||||
pub drain_timeout_secs: u64,
|
||||
/// Default per-RPC timeout in seconds.
|
||||
@@ -250,6 +254,11 @@ pub fn merge_config(args: &crate::Args, file: &FileConfig) -> EffectiveConfig {
|
||||
.clone()
|
||||
.or_else(|| file.ws_listen.clone());
|
||||
|
||||
let webtransport_listen = args
|
||||
.webtransport_listen
|
||||
.clone()
|
||||
.or_else(|| file.webtransport_listen.clone());
|
||||
|
||||
let drain_timeout_secs = if args.drain_timeout == DEFAULT_DRAIN_TIMEOUT_SECS {
|
||||
file.drain_timeout_secs.unwrap_or(DEFAULT_DRAIN_TIMEOUT_SECS)
|
||||
} else {
|
||||
@@ -283,6 +292,7 @@ pub fn merge_config(args: &crate::Args, file: &FileConfig) -> EffectiveConfig {
|
||||
plugin_dir,
|
||||
redact_logs,
|
||||
ws_listen,
|
||||
webtransport_listen,
|
||||
drain_timeout_secs,
|
||||
rpc_timeout_secs,
|
||||
storage_timeout_secs,
|
||||
|
||||
Reference in New Issue
Block a user