pub struct L4Config {
pub upstream: Option<String>,
pub sni_routing: bool,
pub idle_timeout_s: Option<u64>,
pub session_timeout_s: Option<u64>,
pub max_sessions: Option<usize>,
}Expand description
L4 proxying configuration for a tcp or udp listener (DW-103).
The listener accepts raw L4 connections and splices them byte-for-byte
to an upstream endpoint. When sni_routing is true (TCP only), the
dispatcher peeks the TLS ClientHello SNI (reusing the SNI extraction
from DW-008 TLS passthrough) and selects the upstream from the
listener’s tls.sni_routes – the same routing table passthrough
uses. When sni_routing is false, the configured upstream receives
every connection.
Fields§
§upstream: Option<String>Name of the upstream that receives the spliced stream. Required
when sni_routing is false; when sni_routing is true the
upstream is selected per-connection from tls.sni_routes, and
this field is the fallback for connections with no SNI or an
unmatched name (absent = close the connection on no match).
sni_routing: boolPeek the TLS ClientHello SNI and route the connection to the
upstream matched by the listener’s tls.sni_routes (reusing the
SNI extraction from DW-008 TLS passthrough). TCP only; rejected
on UDP listeners by validation (UDP has no byte-stream handshake
to peek). When false, every connection is spliced to the
configured upstream.
idle_timeout_s: Option<u64>Idle timeout in seconds for an established splice. When neither side sends data for this duration, the splice is closed. Absent (or 0) means no idle timeout (the splice runs until either side closes). Bounded by validation to at most 1 hour.
session_timeout_s: Option<u64>DP-01 (#234): UDP session idle timeout in seconds. A UDP session (per-client upstream socket) that receives no datagrams for this duration is evicted from the session table. Default 30s. UDP only; ignored for TCP listeners.
max_sessions: Option<usize>DP-01 (#234): maximum concurrent UDP sessions. When the session table is full, the oldest idle session is evicted (LRU). Default 4096. UDP only; ignored for TCP listeners.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for L4Config
impl<'de> Deserialize<'de> for L4Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for L4Config
impl JsonSchema for L4Config
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for L4Config
Auto Trait Implementations§
impl Freeze for L4Config
impl RefUnwindSafe for L4Config
impl Send for L4Config
impl Sync for L4Config
impl Unpin for L4Config
impl UnwindSafe for L4Config
Blanket Implementations§
§impl<T> AnyExt for T
impl<T> AnyExt for T
§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind reference§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable reference§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointer§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointer§fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
T behind Box pointer§fn downcast_move<T>(this: Self) -> Option<T>
fn downcast_move<T>(this: Self) -> Option<T>
Self to T,
useful only in generic context as a workaround for specializationSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more