From bd84d65d76961242e0ebe04f744ec59fd994970e Mon Sep 17 00:00:00 2001 From: Aviram Hassan Date: Mon, 27 May 2024 14:53:15 +0300 Subject: [PATCH] add feature propagation to hyper-proxy2 dependency (#1502) change from hyper-proxy2 to new fork - hyper-http-proxy Signed-off-by: Aviram Hassan --- kube-client/Cargo.toml | 6 +++--- kube-client/src/client/builder.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kube-client/Cargo.toml b/kube-client/Cargo.toml index c01fce6db..8c3989b00 100644 --- a/kube-client/Cargo.toml +++ b/kube-client/Cargo.toml @@ -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"] @@ -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 @@ -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 } diff --git a/kube-client/src/client/builder.rs b/kube-client/src/client/builder.rs index 81289ec72..f88b3016e 100644 --- a/kube-client/src/client/builder.rs +++ b/kube-client/src/client/builder.rs @@ -96,8 +96,8 @@ impl TryFrom for ClientBuilder { #[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) }