pub struct ConnectionConfig {Show 14 fields
pub routing: Arc<dyn RouteService>,
pub context: ConnectionContext,
pub handshake_timeout: Duration,
pub connect_timeout: Duration,
pub protocols: Arc<[ProtocolId]>,
pub authentication: InboundAuthentication,
pub metrics: Option<Arc<dyn SessionMetrics>>,
pub udp: Option<Arc<dyn UdpService>>,
pub tls_client_config: Option<Arc<ClientConfig>>,
pub shadowsocks: Option<InboundShadowsocksConfig>,
pub trojan: Option<InboundTrojanConfig>,
pub fixed_target: Option<TargetAddr>,
pub local_bind: Option<String>,
pub shadowsocks_metrics: Option<Arc<ShadowsocksMetrics>>,
}Expand description
Configuration for a single connection.
Fields§
§routing: Arc<dyn RouteService>§context: ConnectionContext§handshake_timeout: Duration§connect_timeout: Duration§protocols: Arc<[ProtocolId]>§authentication: InboundAuthentication§metrics: Option<Arc<dyn SessionMetrics>>§udp: Option<Arc<dyn UdpService>>§tls_client_config: Option<Arc<ClientConfig>>Optional TLS client config override for upstream connections (e.g., Trojan).
When None, the chain executor builds a config with system root CAs.
Intended for test-only use (e.g., insecure TLS for self-signed certs).
shadowsocks: Option<InboundShadowsocksConfig>§trojan: Option<InboundTrojanConfig>Optional Trojan inbound configuration for password verification on Trojan listeners.
fixed_target: Option<TargetAddr>§local_bind: Option<String>§shadowsocks_metrics: Option<Arc<ShadowsocksMetrics>>Optional Shadowsocks-specific metrics for observability.
Trait Implementations§
Source§impl Clone for ConnectionConfig
impl Clone for ConnectionConfig
Source§fn clone(&self) -> ConnectionConfig
fn clone(&self) -> ConnectionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ConnectionConfig
impl !UnwindSafe for ConnectionConfig
impl Freeze for ConnectionConfig
impl Send for ConnectionConfig
impl Sync for ConnectionConfig
impl Unpin for ConnectionConfig
impl UnsafeUnpin for ConnectionConfig
Blanket Implementations§
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
Mutably borrows from an owned value. Read more