pub struct NetworkConfig {
pub allowed_domains: Vec<String>,
pub denied_domains: Vec<String>,
pub allow_unix_sockets: Option<Vec<String>>,
pub allow_all_unix_sockets: Option<bool>,
pub allow_local_binding: Option<bool>,
pub http_proxy_port: Option<u16>,
pub socks_proxy_port: Option<u16>,
pub mitm_proxy: Option<MitmProxyConfig>,
}Expand description
Network restriction configuration.
Fields§
§allowed_domains: Vec<String>Domains allowed for network access (e.g., “github.com”, “*.npmjs.org”).
denied_domains: Vec<String>Domains explicitly denied for network access.
allow_unix_sockets: Option<Vec<String>>macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path).
allow_all_unix_sockets: Option<bool>If true, allow all Unix sockets (disables blocking on both platforms). On macOS: allows all socket paths. On Linux: disables seccomp blocking (sockets are blocked by default).
allow_local_binding: Option<bool>Allow binding to localhost.
http_proxy_port: Option<u16>External HTTP proxy port.
socks_proxy_port: Option<u16>External SOCKS proxy port.
mitm_proxy: Option<MitmProxyConfig>MITM proxy configuration.
Trait Implementations§
Source§impl Clone for NetworkConfig
impl Clone for NetworkConfig
Source§fn clone(&self) -> NetworkConfig
fn clone(&self) -> NetworkConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NetworkConfig
impl Debug for NetworkConfig
Source§impl Default for NetworkConfig
impl Default for NetworkConfig
Source§fn default() -> NetworkConfig
fn default() -> NetworkConfig
Returns the “default value” for a type. Read more
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NetworkConfig
impl RefUnwindSafe for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl UnwindSafe for NetworkConfig
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