diff --git a/src/http.rs b/src/http.rs index 9bc77f1a86210a..eb820d705e6974 100644 --- a/src/http.rs +++ b/src/http.rs @@ -139,8 +139,15 @@ pub fn build_proxy_connector( tls_settings: MaybeTlsSettings, proxy_config: &ProxyConfig, ) -> Result>, HttpError> { + // Create dedicated TLS connector for the proxied connection with user TLS settings. + let tls = tls_connector_builder(&tls_settings) + .context(BuildTlsConnectorSnafu)? + .build(); let https = build_tls_connector(tls_settings)?; let mut proxy = ProxyConnector::new(https).unwrap(); + // Make proxy connector aware of user TLS settings by setting the TLS connector: + // https://github.com/vectordotdev/vector/issues/13683 + proxy.set_tls(Some(tls)); proxy_config .configure(&mut proxy) .context(MakeProxyConnectorSnafu)?;