diff --git a/mirrord/cli/src/util.rs b/mirrord/cli/src/util.rs new file mode 100644 index 00000000000..d82e7d21fad --- /dev/null +++ b/mirrord/cli/src/util.rs @@ -0,0 +1,9 @@ +/// Removes `HTTP_PROXY` and `https_proxy` from the environment +pub(crate) fn remove_proxy_env() { + for (key, _val) in std::env::vars() { + let lower_key = key.to_lowercase(); + if lower_key == "http_proxy" || lower_key == "https_proxy" { + std::env::remove_var(key) + } + } +}