From 6b3a4d5eaa8cb723a97096d7fec18cdefe83c654 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 26 Jul 2024 18:32:54 +0900 Subject: [PATCH] fix: fix webpki-roots build feature --- rpxy-lib/Cargo.toml | 2 -- rpxy-lib/src/forwarder/client.rs | 12 ++++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index ed29683..3386d32 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -13,8 +13,6 @@ publish.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -# default = ["http3-s2n", "sticky-cookie", "cache", "rustls-backend", "acme"] -# default = ["http3-quinn", "sticky-cookie", "cache", "rustls-backend", "acme"] http3-quinn = ["socket2", "quinn", "h3", "h3-quinn", "rpxy-certs/http3"] http3-s2n = [ "s2n-quic", diff --git a/rpxy-lib/src/forwarder/client.rs b/rpxy-lib/src/forwarder/client.rs index c5bc39a..bc99b41 100644 --- a/rpxy-lib/src/forwarder/client.rs +++ b/rpxy-lib/src/forwarder/client.rs @@ -204,18 +204,18 @@ where /// Build forwarder pub async fn try_new(_globals: &Arc) -> RpxyResult { // build hyper client with rustls and webpki, only https is allowed - #[cfg(feature = "rustls-backend-webpki")] + #[cfg(feature = "webpki-roots")] let builder = hyper_rustls::HttpsConnectorBuilder::new().with_webpki_roots(); - #[cfg(feature = "rustls-backend-webpki")] + #[cfg(feature = "webpki-roots")] let builder_h2 = hyper_rustls::HttpsConnectorBuilder::new().with_webpki_roots(); - #[cfg(feature = "rustls-backend-webpki")] + #[cfg(feature = "webpki-roots")] info!("Mozilla WebPKI root certs with rustls is used for the connection to backend applications"); - #[cfg(not(feature = "rustls-backend-webpki"))] + #[cfg(not(feature = "webpki-roots"))] let builder = hyper_rustls::HttpsConnectorBuilder::new().with_platform_verifier(); - #[cfg(not(feature = "rustls-backend-webpki"))] + #[cfg(not(feature = "webpki-roots"))] let builder_h2 = hyper_rustls::HttpsConnectorBuilder::new().with_platform_verifier(); - #[cfg(not(feature = "rustls-backend-webpki"))] + #[cfg(not(feature = "webpki-roots"))] info!("Platform verifier with rustls is used for the connection to backend applications"); let mut http = HttpConnector::new();