Skip to content

Commit

Permalink
add feature propagation to hyper-proxy2 dependency (#1502)
Browse files Browse the repository at this point in the history
change from hyper-proxy2 to new fork - hyper-http-proxy

Signed-off-by: Aviram Hassan <aviramyhassan@gmail.com>
  • Loading branch information
aviramha committed May 27, 2024
1 parent 57320a8 commit bd84d65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions kube-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = ["web-programming::http-client", "configuration", "network-programm

[features]
default = ["client"]
rustls-tls = ["rustls", "rustls-pemfile", "hyper-rustls"]
rustls-tls = ["rustls", "rustls-pemfile", "hyper-rustls", "hyper-http-proxy?/rustls-tls-native-roots"]
openssl-tls = ["openssl", "hyper-openssl"]
ws = ["client", "tokio-tungstenite", "rand", "kube-core/ws", "tokio/macros"]
kubelet-debug = ["ws", "kube-core/kubelet-debug"]
Expand All @@ -25,7 +25,7 @@ jsonpatch = ["kube-core/jsonpatch"]
admission = ["kube-core/admission"]
config = ["__non_core", "pem", "home"]
socks5 = ["hyper-socks2"]
http-proxy = ["hyper-proxy2"]
http-proxy = ["hyper-http-proxy"]
unstable-client = []

# private feature sets; do not use
Expand Down Expand Up @@ -62,7 +62,7 @@ kube-core = { path = "../kube-core", version = "=0.91.0" }
jsonpath-rust = { workspace = true, optional = true }
tokio-util = { workspace = true, features = ["io", "codec"], optional = true }
hyper = { workspace = true, features = ["client", "http1"], optional = true }
hyper-proxy2 = {version = "0.1", optional = true}
hyper-http-proxy = { version = "1", default-features = false, optional = true }
hyper-util = { workspace = true, features = ["client", "client-legacy", "http1", "tokio"], optional = true }
hyper-rustls = { workspace = true, features = ["http1", "logging", "native-tokio", "ring", "tls12"], optional = true }
hyper-socks2 = { workspace = true, optional = true }
Expand Down
4 changes: 2 additions & 2 deletions kube-client/src/client/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ impl TryFrom<Config> for ClientBuilder<GenericService> {

#[cfg(feature = "http-proxy")]
Some(proxy_url) if proxy_url.scheme_str() == Some("http") => {
let proxy = hyper_proxy2::Proxy::new(hyper_proxy2::Intercept::All, proxy_url.clone());
let connector = hyper_proxy2::ProxyConnector::from_proxy_unsecured(connector, proxy);
let proxy = hyper_http_proxy::Proxy::new(hyper_http_proxy::Intercept::All, proxy_url.clone());
let connector = hyper_http_proxy::ProxyConnector::from_proxy_unsecured(connector, proxy);

make_generic_builder(connector, config)
}
Expand Down

0 comments on commit bd84d65

Please sign in to comment.