From 66753630e0c77d2900c1cd09fc8baa1ecc40e4e8 Mon Sep 17 00:00:00 2001 From: monosans Date: Fri, 16 Jan 2026 00:58:03 +0300 Subject: [PATCH] fix: streamline client builder setup in build_check_client function --- src/proxy.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/proxy.rs b/src/proxy.rs index b688a03..5aee5c6 100644 --- a/src/proxy.rs +++ b/src/proxy.rs @@ -78,7 +78,7 @@ pub fn build_check_client( mut tls_backend: rustls::ClientConfig, ) -> reqwest::Result { tls_backend.alpn_protocols = vec![b"http/1.1".to_vec()]; - let builder = reqwest::ClientBuilder::new() + reqwest::ClientBuilder::new() .user_agent(config.checking.user_agent.as_bytes()) .proxy(reqwest::Proxy::custom(|_| Some(CHECK_PROXY_URL.get()))) .timeout(config.checking.timeout) @@ -88,16 +88,8 @@ pub fn build_check_client( .http1_only() .tcp_keepalive(None) .tls_backend_preconfigured(tls_backend) - .dns_resolver(dns_resolver); - - #[cfg(any( - target_os = "android", - target_os = "fuchsia", - target_os = "linux" - ))] - let builder = builder.tcp_user_timeout(None); - - builder.build() + .dns_resolver(dns_resolver) + .build() } pub trait ProxySink {