pub struct PrereadConfig<'t> {
pub routes: &'t TrieNode<Vec<(AlpnMatcher, ClusterId)>>,
pub inbound_proxy: bool,
pub max_bytes: usize,
pub timeout: Duration,
pub accept_wildcard: bool,
}Expand description
Routing input, borrowed for the lifetime of one SniPrereadCore::handle_input
call. 't is the lifetime of the route table itself (owned by the
listener config, well outside any single preread attempt).
Fields§
§routes: &'t TrieNode<Vec<(AlpnMatcher, ClusterId)>>SNI -> (AlpnMatcher, ClusterId) route table, reusing
crate::router::pattern_trie::TrieNode (exact hosts, *.
wildcards, regex segments – same trie the HTTP/HTTPS router uses).
inbound_proxy: boolWhether a PROXY-v2 header precedes the ClientHello on the wire.
max_bytes: usizeEffective byte cap for the preread window, enforced only while the
decision is still pending: a window that reaches max_bytes without
a complete PROXY header + ClientHello rejects TooLarge; a COMPLETE
hello routes regardless of trailing post-hello bytes. The caller
guarantees this is <= the accumulator buffer’s capacity.
timeout: DurationPreread deadline, armed once from the first Input::Bytes.
accept_wildcard: boolWhether a *. wildcard route may satisfy a lookup (mirrors the
HTTP router’s accept_wildcard knob on
TrieNode::domain_lookup).
Trait Implementations§
Source§impl<'t> Clone for PrereadConfig<'t>
impl<'t> Clone for PrereadConfig<'t>
Source§fn clone(&self) -> PrereadConfig<'t>
fn clone(&self) -> PrereadConfig<'t>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more