mirror of
https://github.com/typst/typst
synced 2025-07-27 14:27:56 +08:00
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:
parent
97430912ce
commit
3044bb0c76
11
Cargo.lock
generated
11
Cargo.lock
generated
@ -738,16 +738,6 @@ dependencies = [
|
|||||||
"syn",
|
"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]]
|
[[package]]
|
||||||
name = "equivalent"
|
name = "equivalent"
|
||||||
version = "1.0.1"
|
version = "1.0.1"
|
||||||
@ -3115,7 +3105,6 @@ version = "0.13.1"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"dirs",
|
"dirs",
|
||||||
"ecow",
|
"ecow",
|
||||||
"env_proxy",
|
|
||||||
"fastrand",
|
"fastrand",
|
||||||
"flate2",
|
"flate2",
|
||||||
"fontdb",
|
"fontdb",
|
||||||
|
@ -54,7 +54,6 @@ csv = "1"
|
|||||||
ctrlc = "3.4.1"
|
ctrlc = "3.4.1"
|
||||||
dirs = "6"
|
dirs = "6"
|
||||||
ecow = { version = "0.2", features = ["serde"] }
|
ecow = { version = "0.2", features = ["serde"] }
|
||||||
env_proxy = "0.4"
|
|
||||||
fastrand = "2.3"
|
fastrand = "2.3"
|
||||||
flate2 = "1"
|
flate2 = "1"
|
||||||
fontdb = { version = "0.23", default-features = false }
|
fontdb = { version = "0.23", default-features = false }
|
||||||
|
@ -18,7 +18,6 @@ typst-timing = { workspace = true }
|
|||||||
typst-utils = { workspace = true }
|
typst-utils = { workspace = true }
|
||||||
dirs = { workspace = true, optional = true }
|
dirs = { workspace = true, optional = true }
|
||||||
ecow = { workspace = true }
|
ecow = { workspace = true }
|
||||||
env_proxy = { workspace = true, optional = true }
|
|
||||||
fastrand = { workspace = true, optional = true }
|
fastrand = { workspace = true, optional = true }
|
||||||
flate2 = { workspace = true, optional = true }
|
flate2 = { workspace = true, optional = true }
|
||||||
fontdb = { workspace = true, optional = true }
|
fontdb = { workspace = true, optional = true }
|
||||||
@ -41,7 +40,7 @@ default = ["fonts", "packages"]
|
|||||||
fonts = ["dep:fontdb", "fontdb/memmap", "fontdb/fontconfig"]
|
fonts = ["dep:fontdb", "fontdb/memmap", "fontdb/fontconfig"]
|
||||||
|
|
||||||
# Add generic downloading utilities
|
# 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`
|
# Add package downloading utilities, implies `downloads`
|
||||||
packages = ["downloads", "dep:dirs", "dep:flate2", "dep:tar", "dep:fastrand"]
|
packages = ["downloads", "dep:dirs", "dep:flate2", "dep:tar", "dep:fastrand"]
|
||||||
|
@ -118,14 +118,6 @@ impl Downloader {
|
|||||||
// Set user agent.
|
// Set user agent.
|
||||||
builder = builder.user_agent(&self.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.
|
// Apply a custom CA certificate if present.
|
||||||
let maybe_cert = self.cert().transpose()?.cloned().map_or(
|
let maybe_cert = self.cert().transpose()?.cloned().map_or(
|
||||||
RootCerts::PlatformVerifier,
|
RootCerts::PlatformVerifier,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user