chore: massage dependencies and features to remove openssl/native-tls (#2859)

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
This commit is contained in:
Conrad Ludgate
2024-11-03 09:48:35 +00:00
committed by GitHub
parent 81d921d625
commit 2d95ff0830
4 changed files with 319 additions and 224 deletions

View File

@@ -16,18 +16,27 @@ serde_json = "1.0"
serde-xml-rs = "0.6.0"
lazy_static = "1.4.0"
thiserror = "1.0"
reqwest = { version = "0.12.5", features = ["stream", "json", "rustls-tls"] }
reqwest = { version = "0.12.5", default-features = false, features = [
"stream",
"json",
"rustls-tls-native-roots",
] }
async_zip = { version = "0.0.17", features = ["full"] }
semver = "1.0"
chrono = { version = "0.4", features = ["serde"] }
bytes = "1.6.0"
rust-s3 = "0.34.0"
rust-s3 = { version = "0.33.0", default-features = false, features = [
"fail-on-err",
"tags",
"tokio-rustls-tls",
"reqwest",
] }
dashmap = "5.5.3"
sha1_smol = { version = "1.0.0", features = ["std"] }
indexmap = { version = "2.2.6", features = ["serde"]}
indexmap = { version = "2.2.6", features = ["serde"] }
itertools = "0.13.0"
tracing-error = "0.2.0"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-futures = { version = "0.2.5", features = ["futures", "tokio"] }
tracing-futures = { version = "0.2.5", features = ["futures", "tokio"] }

View File

@@ -17,7 +17,7 @@ actix-multipart = "0.6.1"
actix-cors = "0.7.0"
actix-ws = "0.2.5"
actix-files = "0.6.5"
actix-web-prom = { version = "0.8.0", features = ["process"]}
actix-web-prom = { version = "0.8.0", features = ["process"] }
governor = "0.6.3"
tokio = { version = "1.35.1", features = ["sync"] }
@@ -31,10 +31,19 @@ dashmap = "5.4.0"
lazy_static = "1.4.0"
meilisearch-sdk = "0.24.3"
rust-s3 = "0.33.0"
reqwest = { version = "0.11.18", features = ["json", "multipart"] }
hyper = { version = "0.14", features = ["full"] }
hyper-tls = "0.5.0"
rust-s3 = { version = "0.33.0", default-features = false, features = [
"fail-on-err",
"tags",
"tokio-rustls-tls",
"reqwest",
] }
reqwest = { version = "0.11.18", default-features = false, features = [
"json",
"multipart",
"rustls-tls-native-roots",
] }
hyper-rustls = "0.27.3"
hyper-util = "0.1.9"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
@@ -88,16 +97,27 @@ rust_decimal = { version = "1.33.1", features = [
"serde-with-float",
"serde-with-str",
] }
redis = { version = "0.27.5", features = ["tokio-comp", "ahash", "r2d2"]}
redis = { version = "0.27.5", features = ["tokio-comp", "ahash", "r2d2"] }
deadpool-redis = "0.18.0"
clickhouse = { version = "0.11.2", features = ["uuid", "time"] }
clickhouse = { version = "0.13.1", features = [
"uuid",
"time",
"rustls-tls-native-roots",
] }
uuid = { version = "1.2.2", features = ["v4", "fast-rng", "serde"] }
maxminddb = "0.24.0"
flate2 = "1.0.25"
tar = "0.4.38"
sentry = { version = "0.32.1" }
sentry = { version = "0.32.1", default-features = false, features = [
"backtrace",
"contexts",
"debug-images",
"panic",
"rustls",
"reqwest",
] }
sentry-actix = "0.32.1"
image = "0.24.6"
@@ -106,12 +126,18 @@ webp = "0.3.0"
woothee = "0.13.0"
lettre = "0.11.3"
lettre = { version = "0.11.10", default-features = false, features = [
"builder",
"hostname",
"pool",
"smtp-transport",
"tokio1-rustls-tls",
] }
derive-new = "0.6.0"
rust_iso3166 = "0.1.11"
jemallocator = {version = "0.5.4", optional = true}
jemallocator = { version = "0.5.4", optional = true }
async-stripe = { version = "0.37.3", features = ["runtime-tokio-hyper-rustls"] }
rusty-money = "0.4.1"
@@ -121,4 +147,4 @@ json-patch = "*"
actix-http = "3.4.0"
[features]
jemalloc = ["jemallocator"]
jemalloc = ["jemallocator"]

View File

@@ -1,6 +1,3 @@
use hyper::client::HttpConnector;
use hyper_tls::{native_tls, HttpsConnector};
mod fetch;
pub use fetch::*;
@@ -14,15 +11,16 @@ pub async fn init_client_with_database(
database: &str,
) -> clickhouse::error::Result<clickhouse::Client> {
let client = {
let mut http_connector = HttpConnector::new();
http_connector.enforce_http(false); // allow https URLs
let tls_connector =
native_tls::TlsConnector::builder().build().unwrap().into();
let https_connector =
HttpsConnector::from((http_connector, tls_connector));
let hyper_client =
hyper::client::Client::builder().build(https_connector);
let tls_connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.expect("no native root CA certificates found")
.https_only()
.enable_http1()
.build();
let hyper_client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new(),
)
.build(tls_connector);
clickhouse::Client::with_http_client(hyper_client)
.with_url(dotenvy::var("CLICKHOUSE_URL").unwrap())