From fddd12d50d03dbd2a5d534e2a105d8fceb6b07b5 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 22 Mar 2026 12:52:15 +0000 Subject: [PATCH] Clarify raw TCP compatibility helpers Co-authored-by: Maxim Myalin --- src/transport/upstream.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/transport/upstream.rs b/src/transport/upstream.rs index 69d1246..726d2d1 100644 --- a/src/transport/upstream.rs +++ b/src/transport/upstream.rs @@ -220,12 +220,12 @@ impl UpstreamStream { } } + #[allow(dead_code)] pub fn into_tcp(self) -> Result { match self { Self::Tcp(stream) => Ok(stream), Self::Shadowsocks(_) => Err(ProxyError::Config( - "shadowsocks upstreams are not supported when general.use_middle_proxy = true" - .to_string(), + "selected upstream does not expose a raw TCP stream".to_string(), )), } } @@ -810,6 +810,7 @@ impl UpstreamManager { } /// Connect to target through a selected upstream and return egress details. + #[allow(dead_code)] pub async fn connect_with_details( &self, target: SocketAddr,