masque_h2_server (masque v0.7.0)
View SourceMASQUE CONNECT-UDP listener over HTTP/2.
Wraps h2:start_server/3 with a handler fun that validates the Extended CONNECT envelope (RFC 8441 + RFC 9298), matches the request path against the configured URI template, and spawns a per-tunnel masque_h2_server_session on acceptance.
For the cert/key config this follows erlang_h2 conventions: both are PEM file paths (string or binary). quic_h3 takes DER binaries, so the masque facade exposes two distinct start functions and the test helpers keep both forms around.
Summary
Types
Functions
-spec release_tunnel(pid()) -> ok.
-spec start_listener(listener_name(), listener_opts()) -> {ok, h2:server_ref()} | {error, term()}.
-spec stop_listener(h2:server_ref() | listener_name()) -> ok | {error, term()}.
-spec try_reserve_tunnel(pid(), pos_integer()) -> boolean().