Remove dependency on env_proxy

ureq 3 supports picking up the proxy env vars by itself, so no need to bring in this dependency with us!
This commit is contained in:
Ariel Fridman 2025-06-02 14:28:47 +03:00
parent 97430912ce
commit 3044bb0c76
4 changed files with 1 additions and 22 deletions

11
Cargo.lock generated
View File

@ -738,16 +738,6 @@ dependencies = [
"syn",
]
[[package]]
name = "env_proxy"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a5019be18538406a43b5419a5501461f0c8b49ea7dfda0cfc32f4e51fc44be1"
dependencies = [
"log",
"url",
]
[[package]]
name = "equivalent"
version = "1.0.1"
@ -3115,7 +3105,6 @@ version = "0.13.1"
dependencies = [
"dirs",
"ecow",
"env_proxy",
"fastrand",
"flate2",
"fontdb",

View File

@ -54,7 +54,6 @@ csv = "1"
ctrlc = "3.4.1"
dirs = "6"
ecow = { version = "0.2", features = ["serde"] }
env_proxy = "0.4"
fastrand = "2.3"
flate2 = "1"
fontdb = { version = "0.23", default-features = false }

View File

@ -18,7 +18,6 @@ typst-timing = { workspace = true }
typst-utils = { workspace = true }
dirs = { workspace = true, optional = true }
ecow = { workspace = true }
env_proxy = { workspace = true, optional = true }
fastrand = { workspace = true, optional = true }
flate2 = { workspace = true, optional = true }
fontdb = { workspace = true, optional = true }
@ -41,7 +40,7 @@ default = ["fonts", "packages"]
fonts = ["dep:fontdb", "fontdb/memmap", "fontdb/fontconfig"]
# Add generic downloading utilities
downloads = ["dep:env_proxy", "dep:native-tls", "dep:ureq", "dep:openssl"]
downloads = ["dep:native-tls", "dep:ureq", "dep:openssl"]
# Add package downloading utilities, implies `downloads`
packages = ["downloads", "dep:dirs", "dep:flate2", "dep:tar", "dep:fastrand"]

View File

@ -118,14 +118,6 @@ impl Downloader {
// Set user agent.
builder = builder.user_agent(&self.user_agent);
// Get the network proxy config from the environment and apply it.
if let Some(proxy) = env_proxy::for_url_str(url)
.to_string()
.and_then(|url| ureq::Proxy::new(&url).ok())
{
builder = builder.proxy(Some(proxy));
}
// Apply a custom CA certificate if present.
let maybe_cert = self.cert().transpose()?.cloned().map_or(
RootCerts::PlatformVerifier,