commit f7056bcaa5d9e699f667994592ffb4bc02619a1e
parent 155109dea120e109e1e027d4e1312b6adad4c231
Author: Jake Howard <git@theorangeone.net>
Date: Wed, 7 Apr 2021 19:25:02 +0100
Enable socks feature for reqwest
This allowed HTTP_PROXY be set with a socks5 proxy
Diffstat:
2 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/Cargo.lock b/Cargo.lock
@@ -564,6 +564,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f"
[[package]]
+name = "either"
+version = "1.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
+
+[[package]]
name = "encoding_rs"
version = "0.8.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2213,6 +2219,7 @@ dependencies = [
"serde_urlencoded",
"tokio",
"tokio-native-tls",
+ "tokio-socks",
"tokio-util",
"url 2.2.1",
"wasm-bindgen",
@@ -2768,6 +2775,26 @@ dependencies = [
]
[[package]]
+name = "thiserror"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0"
+dependencies = [
+ "proc-macro2 1.0.24",
+ "quote 1.0.9",
+ "syn 1.0.65",
+]
+
+[[package]]
name = "threadpool"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2866,6 +2893,18 @@ dependencies = [
]
[[package]]
+name = "tokio-socks"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0"
+dependencies = [
+ "either",
+ "futures-util",
+ "thiserror",
+ "tokio",
+]
+
+[[package]]
name = "tokio-util"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
@@ -32,7 +32,7 @@ rocket = { version = "0.5.0-dev", features = ["tls"], default-features = false }
rocket_contrib = "0.5.0-dev"
# HTTP client
-reqwest = { version = "0.11.2", features = ["blocking", "json", "gzip", "brotli"] }
+reqwest = { version = "0.11.2", features = ["blocking", "json", "gzip", "brotli", "socks"] }
# multipart/form-data support
multipart = { version = "0.17.1", features = ["server"], default-features = false }