pub struct ListenerConfig {
pub bind_addr: SocketAddr,
pub cert_chain: Vec<CertificateDer<'static>>,
pub key_der: PrivateKeyDer<'static>,
pub transport_config: Option<Arc<TransportConfig>>,
pub transport_profile: Option<TransportProfile>,
pub installer: Option<Arc<dyn TransportInstaller>>,
}Expand description
Configuration for the proxy’s listener.
Fields§
§bind_addr: SocketAddrAddress to bind to (e.g., "0.0.0.0:4443").
cert_chain: Vec<CertificateDer<'static>>TLS certificate chain (DER-encoded).
key_der: PrivateKeyDer<'static>TLS private key (DER-encoded).
transport_config: Option<Arc<TransportConfig>>Optional QUIC transport parameters — flow-control windows, MTU, keep-alive, congestion control — applied to every client connection this listener accepts.
None leaves quinn’s defaults in place, which is the behaviour
callers had before this field existed.
Setting this and ListenerConfig::transport_profile is
refused by Listener::bind rather than merged, with
ProxyError::TransportConfigAndProfile naming
Leg::Client — see that variant for why no merge is possible.
transport_profile: Option<TransportProfile>The same parameters as ListenerConfig::transport_config, as a
value that can be written down, checked and stored.
Some(_) builds the client leg’s quinn::TransportConfig from this
profile — through ListenerConfig::installer, or through
transport::DefaultInstaller when there is none — and installs it
before the endpoint exists. A profile the installer refuses is
ProxyError::TransportProfile, and nothing is bound.
None is the behaviour callers had before this field existed. It is
the only alternative to transport_config, never a companion to
it: a leg naming both is refused at bind time.
installer: Option<Arc<dyn TransportInstaller>>How ListenerConfig::transport_profile becomes the config this
leg installs.
None uses transport::DefaultInstaller, which applies the
profile over a fresh quinn::TransportConfig::default(). Supply one
to start from a base of your own instead — the trait exists because
a quinn::TransportConfig cannot be cloned, so the only way to have
a base and a profile is to build the base again for each leg.
Inert without a profile. TransportInstaller::build takes a
profile, so an installer set beside an empty
ListenerConfig::transport_profile is never called and the leg
installs nothing. It is said here because a setting that is quietly
ignored is the failure this crate is least willing to hide.
It composes with a qlog spec — named in plain code font
because that field exists only under the qlog feature, so a link
from this always-compiled one would not resolve. A leg carrying a
profile, a spec and an installer builds its config here, once, and
the capture sink is attached to what came back;
TransportInstaller::build returns an owned
quinn::TransportConfig precisely so that the two can stack.