pub struct NetworkConfig {
pub enabled: bool,
pub interface: InterfaceOverrides,
pub ports: Vec<PublishedPort>,
pub policy: NetworkPolicy,
pub dns: DnsConfig,
pub tls: TlsConfig,
pub secrets: SecretsConfig,
pub max_connections: Option<usize>,
pub rate_limiter: Option<NetworkRateLimiterConfig>,
pub trust_host_cas: bool,
pub outbound_proxy: Option<OutboundProxy>,
}Expand description
Complete network configuration for a sandbox.
Narrowed for the smoltcp in-process engine. Gateway, prefix length, and other host-backend details are engine internals derived from the sandbox slot — the user only specifies what matters: interface overrides, ports, policy, DNS, TLS, and connection limits.
Fields§
§enabled: boolWhether networking is enabled for this sandbox.
interface: InterfaceOverridesGuest interface overrides. Unset fields derived from sandbox slot.
ports: Vec<PublishedPort>Host → guest port mappings.
policy: NetworkPolicyEgress/ingress policy rules.
dns: DnsConfigDNS interception and filtering settings.
tls: TlsConfigTLS interception settings.
secrets: SecretsConfigSecret injection settings.
max_connections: Option<usize>Max concurrent guest connections. Default: 256, maximum: 4096.
rate_limiter: Option<NetworkRateLimiterConfig>Egress and ingress rate limits. None means unlimited in both directions.
trust_host_cas: boolShip the host’s trusted root CAs into the guest at boot so outbound TLS works behind corporate MITM proxies (Cloudflare Warp Zero Trust, Zscaler, Netskope, etc.) whose gateway CA is installed on the host but not shipped in the Mozilla root bundle the guest OS uses. Opt-in: host trust is not copied into the guest unless this is explicitly enabled. Default: false.
outbound_proxy: Option<OutboundProxy>Proxy that all outbound sandbox connections are dialed through.
Applies to TLS-intercepted and bypassed/plain TCP traffic. SOCKS5 also relays non-DNS UDP; SOCKS4 blocks it because that protocol has no UDP command.
Trait Implementations§
Source§impl Clone for NetworkConfig
impl Clone for NetworkConfig
Source§fn clone(&self) -> NetworkConfig
fn clone(&self) -> NetworkConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NetworkConfig
impl Debug for NetworkConfig
Source§impl Default for NetworkConfig
impl Default for NetworkConfig
Source§impl<'de> Deserialize<'de> for NetworkConfig
impl<'de> Deserialize<'de> for NetworkConfig
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>,
Auto Trait Implementations§
impl Freeze for NetworkConfig
impl RefUnwindSafe for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl UnsafeUnpin for NetworkConfig
impl UnwindSafe for NetworkConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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