summaryrefslogtreecommitdiffhomepage
path: root/tools/unitctl/unit-client-rs
diff options
context:
space:
mode:
Diffstat (limited to 'tools/unitctl/unit-client-rs')
-rw-r--r--tools/unitctl/unit-client-rs/Cargo.toml6
-rw-r--r--tools/unitctl/unit-client-rs/src/lib.rs1
-rw-r--r--tools/unitctl/unit-client-rs/src/unit_client.rs11
-rw-r--r--tools/unitctl/unit-client-rs/src/unitd_docker.rs2
4 files changed, 13 insertions, 7 deletions
diff --git a/tools/unitctl/unit-client-rs/Cargo.toml b/tools/unitctl/unit-client-rs/Cargo.toml
index 6d873417..4fd77036 100644
--- a/tools/unitctl/unit-client-rs/Cargo.toml
+++ b/tools/unitctl/unit-client-rs/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "unit-client-rs"
-version = "1.33.0"
+version = "1.34.0"
authors = ["Elijah Zupancic"]
edition = "2021"
license = "Apache-2.0"
@@ -15,7 +15,7 @@ default = ["serde_json/preserve_order"]
[dependencies]
custom_error = "1.9"
hyper = { version = "0.14", features = ["stream"] }
-hyper-tls = "0.5"
+hyper-rustls = { version = "0.25.0", features = ["rustls-native-certs", "webpki-roots", "http2"] }
hyperlocal = "0.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
@@ -27,7 +27,7 @@ which = "5.0"
unit-openapi = { path = "../unit-openapi" }
rustls = "0.23.5"
-bollard = "0.16.1"
+bollard = "0.17.1"
regex = "1.10.4"
pbr = "1.1.1"
diff --git a/tools/unitctl/unit-client-rs/src/lib.rs b/tools/unitctl/unit-client-rs/src/lib.rs
index a0933f42..59dd2681 100644
--- a/tools/unitctl/unit-client-rs/src/lib.rs
+++ b/tools/unitctl/unit-client-rs/src/lib.rs
@@ -1,7 +1,6 @@
extern crate custom_error;
extern crate futures;
extern crate hyper;
-extern crate hyper_tls;
extern crate hyperlocal;
extern crate serde;
extern crate serde_json;
diff --git a/tools/unitctl/unit-client-rs/src/unit_client.rs b/tools/unitctl/unit-client-rs/src/unit_client.rs
index 3d09e67a..10d11e5f 100644
--- a/tools/unitctl/unit-client-rs/src/unit_client.rs
+++ b/tools/unitctl/unit-client-rs/src/unit_client.rs
@@ -9,7 +9,7 @@ use hyper::body::{Buf, HttpBody};
use hyper::client::{HttpConnector, ResponseFuture};
use hyper::Error as HyperError;
use hyper::{http, Body, Client, Request};
-use hyper_tls::HttpsConnector;
+use hyper_rustls::{HttpsConnectorBuilder, HttpsConnector};
use hyperlocal::{UnixClientExt, UnixConnector};
use serde::{Deserialize, Serialize};
@@ -185,7 +185,14 @@ impl UnitClient {
}
pub fn new_http(control_socket: ControlSocket) -> Self {
- let remote_client = Client::builder().build(HttpsConnector::new());
+ let remote_client = Client::builder()
+ .build(HttpsConnectorBuilder::default()
+ .with_native_roots()
+ .unwrap_or_else(|_| HttpsConnectorBuilder::default()
+ .with_webpki_roots())
+ .https_or_http()
+ .enable_all_versions()
+ .wrap_connector(HttpConnector::new()));
Self {
control_socket,
client: Box::from(RemoteClient::Tcp { client: remote_client }),
diff --git a/tools/unitctl/unit-client-rs/src/unitd_docker.rs b/tools/unitctl/unit-client-rs/src/unitd_docker.rs
index 2b9e0c7d..001f02a7 100644
--- a/tools/unitctl/unit-client-rs/src/unitd_docker.rs
+++ b/tools/unitctl/unit-client-rs/src/unitd_docker.rs
@@ -144,7 +144,7 @@ impl UnitdContainer {
if let Ok(docker) = Docker::connect_with_local_defaults() {
match docker.list_containers::<String>(None).await {
Err(e) => {
- eprintln!("{}", e);
+ eprintln!("Could not read docker instances: {}", e);
vec![]
}
Ok(summary) => {