Skip to content

Commit 766a0d6

Browse files
committed
feat(client): add proxy::matcher utilities
A builder for configuring a matcher, as well as the ability to create one from standard environment variables.
1 parent a891979 commit 766a0d6

File tree

4 files changed

+611
-3
lines changed

4 files changed

+611
-3
lines changed

Cargo.toml

+7-3
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@ features = ["full"]
1818
rustdoc-args = ["--cfg", "docsrs"]
1919

2020
[dependencies]
21-
hyper = "1.6.0"
21+
base64 = { version = "0.22", optional = true }
22+
bytes = "1.7.1"
23+
futures-channel = { version = "0.3", optional = true }
2224
futures-util = { version = "0.3.16", default-features = false }
2325
http = "1.0"
2426
http-body = "1.0.0"
25-
bytes = "1.7.1"
27+
hyper = "1.6.0"
28+
ipnet = { version = "2.9", optional = true }
29+
percent-encoding = { version = "2.3", optional = true }
2630
pin-project-lite = "0.2.4"
27-
futures-channel = { version = "0.3", optional = true }
2831
socket2 = { version = "0.5.9", optional = true, features = ["all"] }
2932
tracing = { version = "0.1", default-features = false, features = ["std"], optional = true }
3033
tokio = { version = "1", optional = true, default-features = false }
@@ -61,6 +64,7 @@ full = [
6164

6265
client = ["hyper/client", "dep:tracing", "dep:futures-channel", "dep:tower-service"]
6366
client-legacy = ["client", "dep:socket2", "tokio/sync", "dep:libc"]
67+
client-proxy-env = ["client", "dep:base64", "dep:ipnet", "dep:percent-encoding"]
6468

6569
server = ["hyper/server"]
6670
server-auto = ["server", "http1", "http2"]

src/client/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
/// Legacy implementations of `connect` module and `Client`
44
#[cfg(feature = "client-legacy")]
55
pub mod legacy;
6+
7+
// for now, no others features use this mod
8+
//#[cfg(feature = "client-proxy-env")]
9+
pub mod proxy;

0 commit comments

Comments
 (0)