pub enum RejectReason {
NotTls,
MalformedRecord,
MalformedHandshake,
Fragmented,
TooLarge,
NoSni,
EchOuterAbsent,
SniUnmatched,
AlpnUnmatched,
ProxyHeaderInvalid,
FrontClosed,
}Expand description
Why a preread attempt was terminally rejected.
Variants§
NotTls
The first TLS record’s ContentType was not handshake (22).
MalformedRecord
A TLS record’s framing is invalid (bad length, or a non-handshake
record interrupting an in-progress ClientHello reassembly).
MalformedHandshake
The known-complete ClientHello body fails ANY of the following
(parser.rs’s single catch-all for the inner body, since none of
them can be NeedMore once the outer handshake framing has already
proven the body fully present):
- the handshake message is not a ClientHello (wrong
msg_type); - a length-prefixed field inside the body lies about the bytes
available (
session_id/cipher_suites/compression_methods/ extensions-block lengths, or a nested extension’s own declared length); - the
server_nameextension’shost_nameis not valid UTF-8; - a second
server_nameextension, or a secondalpnextension, is present (RFC 8446 §4.2 forbids more than one of the same type — Sōzu forwards the original bytes verbatim, so silently resolving a duplicate differently than a tolerant backend would be a routing/ forwarding mismatch); - a single
server_nameextension’sserver_name_listitself carries more than onehost_name(type0) entry (RFC 6066 §3); - the
alpnextension’sprotocol_name_listcontains a zero-length protocol name, or is present but empty (RFC 7301 §3.1 declares both1..2^8-1-length names and a non-empty list).
Fragmented
The preread deadline fired before a terminal verdict was reached.
TooLarge
The accumulated window reached PrereadConfig::max_bytes while
the PROXY header / ClientHello was still incomplete – it can never
complete within the cap. A COMPLETE hello routes regardless of total
window length (post-hello trailing bytes are normal in passthrough).
NoSni
No usable SNI: the server_name extension was absent, empty, or
its RFC 6066 host_name entry was missing.
EchOuterAbsent
encrypted_client_hello (0xfe0d) was present and no usable outer
server_name was available – distinguished from Self::NoSni
because an ECH-hiding client is a different operational signal.
SniUnmatched
The normalized SNI matched no route.
AlpnUnmatched
The SNI matched a route, but no entry’s AlpnMatcher accepted the
client’s offered ALPN protocols (and no AlpnMatcher::Any entry
was present either).
ProxyHeaderInvalid
The PROXY-v2 header itself failed to parse.
FrontClosed
The frontend closed before a decision was reached.
Trait Implementations§
Source§impl Clone for RejectReason
impl Clone for RejectReason
Source§fn clone(&self) -> RejectReason
fn clone(&self) -> RejectReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RejectReason
Source§impl Debug for RejectReason
impl Debug for RejectReason
impl Eq for RejectReason
Source§impl PartialEq for RejectReason
impl PartialEq for RejectReason
impl StructuralPartialEq for RejectReason
Auto Trait Implementations§
impl Freeze for RejectReason
impl RefUnwindSafe for RejectReason
impl Send for RejectReason
impl Sync for RejectReason
impl Unpin for RejectReason
impl UnsafeUnpin for RejectReason
impl UnwindSafe for RejectReason
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.