From 6030bebac5a2dcf004d401f717871c2ba1824c95 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 9 Dec 2023 00:41:32 +0900 Subject: [PATCH] chore: prioritize rustls-backend while it is not supported (non-default) --- rpxy-lib/src/forwarder/client.rs | 2 +- rpxy-lib/src/lib.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rpxy-lib/src/forwarder/client.rs b/rpxy-lib/src/forwarder/client.rs index 3d0f995..22c2320 100644 --- a/rpxy-lib/src/forwarder/client.rs +++ b/rpxy-lib/src/forwarder/client.rs @@ -95,7 +95,7 @@ Please enable native-tls-backend or rustls-backend feature to enable TLS support } } -#[cfg(feature = "native-tls-backend")] +#[cfg(all(feature = "native-tls-backend", not(feature = "rustls-backend")))] /// Build forwarder with hyper-tls (native-tls) impl Forwarder, B1> where diff --git a/rpxy-lib/src/lib.rs b/rpxy-lib/src/lib.rs index 4f66634..6336e19 100644 --- a/rpxy-lib/src/lib.rs +++ b/rpxy-lib/src/lib.rs @@ -40,6 +40,9 @@ where #[cfg(all(feature = "http3-quinn", feature = "http3-s2n"))] warn!("Both \"http3-quinn\" and \"http3-s2n\" features are enabled. \"http3-quinn\" will be used"); + #[cfg(all(feature = "native-tls-backend", feature = "rustls-backend"))] + warn!("Both \"native-tls-backend\" and \"rustls-backend\" features are enabled. \"rustls-backend\" will be used"); + // For initial message logging if proxy_config.listen_sockets.iter().any(|addr| addr.is_ipv6()) { info!("Listen both IPv4 and IPv6")