diff --git a/Cargo.lock b/Cargo.lock index 93467fc3..88d39faf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -161,6 +161,16 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-socks5" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da2537846e16b96d2972ee52a3b355663872a1a687ce6d57a3b6f6b6a181c89" +dependencies = [ + "thiserror", + "tokio", +] + [[package]] name = "async-stream" version = "0.3.5" @@ -1366,6 +1376,21 @@ dependencies = [ "webpki-roots", ] +[[package]] +name = "hyper-socks2" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51c227614c208f7e7c2e040526912604a1a957fe467c9c2f5b06c5d032337dab" +dependencies = [ + "async-socks5", + "http", + "hyper", + "hyper-util", + "thiserror", + "tokio", + "tower-service", +] + [[package]] name = "hyper-timeout" version = "0.5.1" @@ -1619,6 +1644,7 @@ dependencies = [ "hyper", "hyper-http-proxy", "hyper-rustls", + "hyper-socks2", "hyper-timeout", "hyper-util", "jsonpath-rust", diff --git a/Cargo.nix b/Cargo.nix index 54033886..a034e6c3 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -521,6 +521,36 @@ rec { } ]; + }; + "async-socks5" = rec { + crateName = "async-socks5"; + version = "0.6.0"; + edition = "2021"; + sha256 = "128w31m6nvrvgbaycz3838m8fqsn6lxjmr9fjz99csz18rw578ld"; + libName = "async_socks5"; + authors = [ + "Arsenii Lyashenko " + "Temirkhan Myrzamadi " + ]; + dependencies = [ + { + name = "thiserror"; + packageId = "thiserror"; + } + { + name = "tokio"; + packageId = "tokio"; + features = [ "net" "io-util" ]; + } + ]; + devDependencies = [ + { + name = "tokio"; + packageId = "tokio"; + features = [ "net" "io-util" "rt" "macros" ]; + } + ]; + }; "async-stream" = rec { crateName = "async-stream"; @@ -4243,6 +4273,68 @@ rec { }; resolvedDefaultFeatures = [ "http1" "log" "logging" "native-tokio" "ring" "rustls-native-certs" "tls12" "webpki-roots" "webpki-tokio" ]; }; + "hyper-socks2" = rec { + crateName = "hyper-socks2"; + version = "0.9.1"; + edition = "2021"; + sha256 = "1avx6crd1i86bcprqz26zrbsk8844s8jc1845ry7x3r09ihjghji"; + libName = "hyper_socks2"; + authors = [ + "Arsenii Lyashenko " + ]; + dependencies = [ + { + name = "async-socks5"; + packageId = "async-socks5"; + } + { + name = "http"; + packageId = "http"; + } + { + name = "hyper"; + packageId = "hyper"; + } + { + name = "hyper-util"; + packageId = "hyper-util"; + features = [ "tokio" ]; + } + { + name = "thiserror"; + packageId = "thiserror"; + } + { + name = "tokio"; + packageId = "tokio"; + } + { + name = "tower-service"; + packageId = "tower-service"; + } + ]; + devDependencies = [ + { + name = "hyper-util"; + packageId = "hyper-util"; + features = [ "http1" "client" "client-legacy" ]; + } + { + name = "tokio"; + packageId = "tokio"; + features = [ "macros" ]; + } + ]; + features = { + "default" = [ "tls" ]; + "hyper-rustls" = [ "dep:hyper-rustls" ]; + "hyper-tls" = [ "dep:hyper-tls" ]; + "rustls" = [ "hyper-rustls" "rusttls" "rustls-native-certs" ]; + "rustls-native-certs" = [ "dep:rustls-native-certs" ]; + "rusttls" = [ "dep:rusttls" ]; + "tls" = [ "hyper-tls" ]; + }; + }; "hyper-timeout" = rec { crateName = "hyper-timeout"; version = "0.5.1"; @@ -4974,7 +5066,7 @@ rec { "unstable-runtime" = [ "kube-runtime/unstable-runtime" ]; "ws" = [ "kube-client/ws" "kube-core/ws" ]; }; - resolvedDefaultFeatures = [ "client" "config" "derive" "jsonpatch" "kube-client" "kube-derive" "kube-runtime" "runtime" "rustls-tls" "ws" ]; + resolvedDefaultFeatures = [ "client" "config" "derive" "http-proxy" "jsonpatch" "kube-client" "kube-derive" "kube-runtime" "runtime" "rustls-tls" "socks5" "ws" ]; }; "kube-client" = rec { crateName = "kube-client"; @@ -5054,6 +5146,12 @@ rec { usesDefaultFeatures = false; features = [ "http1" "logging" "native-tokio" "ring" "tls12" ]; } + { + name = "hyper-socks2"; + packageId = "hyper-socks2"; + optional = true; + usesDefaultFeatures = false; + } { name = "hyper-timeout"; packageId = "hyper-timeout"; @@ -5225,7 +5323,7 @@ rec { "tracing" = [ "dep:tracing" ]; "ws" = [ "client" "tokio-tungstenite" "rand" "kube-core/ws" "tokio/macros" ]; }; - resolvedDefaultFeatures = [ "__non_core" "base64" "bytes" "chrono" "client" "config" "either" "futures" "home" "http-body" "http-body-util" "hyper" "hyper-rustls" "hyper-timeout" "hyper-util" "jsonpatch" "jsonpath-rust" "pem" "rand" "rustls" "rustls-pemfile" "rustls-tls" "serde_yaml" "tokio" "tokio-tungstenite" "tokio-util" "tower" "tower-http" "tracing" "ws" ]; + resolvedDefaultFeatures = [ "__non_core" "base64" "bytes" "chrono" "client" "config" "either" "futures" "home" "http-body" "http-body-util" "http-proxy" "hyper" "hyper-http-proxy" "hyper-rustls" "hyper-socks2" "hyper-timeout" "hyper-util" "jsonpatch" "jsonpath-rust" "pem" "rand" "rustls" "rustls-pemfile" "rustls-tls" "serde_yaml" "socks5" "tokio" "tokio-tungstenite" "tokio-util" "tower" "tower-http" "tracing" "ws" ]; }; "kube-core" = rec { crateName = "kube-core"; @@ -9564,7 +9662,7 @@ rec { name = "kube"; packageId = "kube"; usesDefaultFeatures = false; - features = [ "client" "rustls-tls" "ws" ]; + features = [ "client" "rustls-tls" "ws" "socks5" "http-proxy" ]; } { name = "rand"; diff --git a/Cargo.toml b/Cargo.toml index abace1de..b0cef9a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ dotenvy = "0.15" futures = "0.3" indexmap = { version = "2.2", features = ["serde"] } k8s-openapi = { version = "0.22", default-features = false, features = ["v1_30"] } -kube = { version = "0.93", default-features = false, features = ["client", "rustls-tls", "ws"] } +kube = { version = "0.93", default-features = false, features = ["client", "rustls-tls", "ws", "socks5", "http-proxy"] } lazy_static = "1.5" libc = "0.2" once_cell = "1.19" diff --git a/rust/stackablectl/CHANGELOG.md b/rust/stackablectl/CHANGELOG.md index c99925e9..5e331be9 100644 --- a/rust/stackablectl/CHANGELOG.md +++ b/rust/stackablectl/CHANGELOG.md @@ -7,11 +7,13 @@ All notable changes to this project will be documented in this file. ### Added - Add shell completions for Nushell and Elvish ([#337]). +- SOCKS5 and HTTP proxy support ([#328]). ### Fixed - Sort operator versions by semver version instead of alphabetically ([#336]). +[#328]: https://github.com/stackabletech/stackable-cockpit/pull/328 [#336]: https://github.com/stackabletech/stackable-cockpit/pull/336 [#337]: https://github.com/stackabletech/stackable-cockpit/pull/337