pub struct EnvOnlyEnforcer;Expand description
Enforcer that only sets proxy env and runs the child (no runner, no isolation). Used when force_traffic_through_proxy is false, or when we’re already inside the runner (Docker/Firecracker).
Trait Implementations§
Source§impl Enforce for EnvOnlyEnforcer
impl Enforce for EnvOnlyEnforcer
Source§fn maybe_spawn_runner(
&self,
_cmd: &str,
_secret_mappings: &[SecretMapping],
_string_mappings: &[StringMapping],
_allow_private_connect: bool,
_upstream_ca: &Option<PathBuf>,
_connection_policies: &[ConnectionPolicy],
) -> Result<Option<ExitStatus>, Box<dyn Error + Send + Sync>>
fn maybe_spawn_runner( &self, _cmd: &str, _secret_mappings: &[SecretMapping], _string_mappings: &[StringMapping], _allow_private_connect: bool, _upstream_ca: &Option<PathBuf>, _connection_policies: &[ConnectionPolicy], ) -> Result<Option<ExitStatus>, Box<dyn Error + Send + Sync>>
If this platform enforces by spawning a runner process (e.g. Linux network namespace),
spawn it and return
Ok(Some(status)). Otherwise return Ok(None) and the caller
will run proxy+child in-process.Source§fn run_child(
&self,
cmd: &str,
proxy_url: &str,
env_vars_with_masked: &[(String, String)],
ssl_cert_file: &Path,
_force: bool,
) -> Result<ExitStatus, Box<dyn Error + Send + Sync>>
fn run_child( &self, cmd: &str, proxy_url: &str, env_vars_with_masked: &[(String, String)], ssl_cert_file: &Path, _force: bool, ) -> Result<ExitStatus, Box<dyn Error + Send + Sync>>
Run the child process with proxy env vars. When
force is true, wrap with platform
sandbox (e.g. sandbox-exec on macOS). Otherwise run normally (e.g. duct).Auto Trait Implementations§
impl Freeze for EnvOnlyEnforcer
impl RefUnwindSafe for EnvOnlyEnforcer
impl Send for EnvOnlyEnforcer
impl Sync for EnvOnlyEnforcer
impl Unpin for EnvOnlyEnforcer
impl UnsafeUnpin for EnvOnlyEnforcer
impl UnwindSafe for EnvOnlyEnforcer
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