feat: add native tls for backend client (#377)

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2024-04-09 21:21:15 +08:00 committed by GitHub
parent ac332ca438
commit d9dcf86be3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ dragonfly-client-util = { path = "dragonfly-client-util", version = "0.1.27" }
dragonfly-client-init = { path = "dragonfly-client-init", version = "0.1.27" } dragonfly-client-init = { path = "dragonfly-client-init", version = "0.1.27" }
thiserror = "1.0" thiserror = "1.0"
dragonfly-api = "2.0.106" dragonfly-api = "2.0.106"
reqwest = { version = "0.11.27", features = ["stream", "native-tls", "rustls-tls"] } reqwest = { version = "0.11.27", features = ["stream", "native-tls", "default-tls", "rustls-tls"] }
rcgen = { version = "0.12.1", features = ["x509-parser"] } rcgen = { version = "0.12.1", features = ["x509-parser"] }
hyper = { version = "1.2", features = ["full"] } hyper = { version = "1.2", features = ["full"] }
hyper-util = { version = "0.1.2", features = ["client", "client-legacy", "tokio", "server-auto", "http1", "http2"] } hyper-util = { version = "0.1.2", features = ["client", "client-legacy", "tokio", "server-auto", "http1", "http2"] }

View File

@ -137,7 +137,7 @@ impl HTTP {
} }
None => { None => {
// Default TLS client config with native roots. // Default TLS client config with native roots.
let client = reqwest::Client::builder().build()?; let client = reqwest::Client::builder().use_native_tls().build()?;
Ok(client) Ok(client)
} }
} }