pub enum NetworkMode {
Unrestricted,
DenyAll,
Allowlist,
Proxy,
}Variants§
Unrestricted
Unrestricted outbound (default; Bash often needs curl / npm install).
DenyAll
No outbound network access at all. On macOS 26 that includes name
resolution, which goes through mDNSResponder’s unix socket.
Allowlist
Outbound restricted to SandboxPolicy::allowed_domains. Neither
backend can filter by domain: macOS lets through localhost when the
list names it and nothing else, Linux cuts the network entirely, and
both report the domains they could not allow as unmet.
Proxy
Outbound only to SandboxPolicy::egress_proxy, with the command’s
*_PROXY variables pointing at it; what the proxy lets through is the
proxy’s business. Without an egress_proxy the network is cut, as
under DenyAll, and reported unmet.
Trait Implementations§
Source§impl Clone for NetworkMode
impl Clone for NetworkMode
impl Copy for NetworkMode
Source§impl Debug for NetworkMode
impl Debug for NetworkMode
Source§impl Default for NetworkMode
impl Default for NetworkMode
Source§impl<'de> Deserialize<'de> for NetworkMode
impl<'de> Deserialize<'de> for NetworkMode
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
impl Eq for NetworkMode
Source§impl JsonSchema for NetworkMode
impl JsonSchema for NetworkMode
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for NetworkMode
impl PartialEq for NetworkMode
Source§impl Serialize for NetworkMode
impl Serialize for NetworkMode
impl StructuralPartialEq for NetworkMode
Auto Trait Implementations§
impl Forget for NetworkMode
impl Freeze for NetworkMode
impl Move for NetworkMode
impl RefUnwindSafe for NetworkMode
impl Send for NetworkMode
impl Sync for NetworkMode
impl Unpin for NetworkMode
impl UnsafeUnpin for NetworkMode
impl UnwindSafe for NetworkMode
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