From 9a25e8e810adac094b7408e6c24b4f51feacf651 Mon Sep 17 00:00:00 2001 From: Alexey <247128645+axkurcom@users.noreply.github.com> Date: Sun, 15 Feb 2026 03:17:45 +0300 Subject: [PATCH] Update client.rs --- src/proxy/client.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/proxy/client.rs b/src/proxy/client.rs index 8b4e8bc..c40c6a4 100644 --- a/src/proxy/client.rs +++ b/src/proxy/client.rs @@ -24,11 +24,6 @@ use crate::proxy::handshake::{HandshakeSuccess, handle_mtproto_handshake, handle use crate::proxy::masking::handle_bad_client; use crate::proxy::middle_relay::handle_via_middle_proxy; -/// Handle a client connection from any stream type (TCP, Unix socket) -/// -/// This is the generic entry point for client handling. Unlike `ClientHandler::new().run()`, -/// it skips TCP-specific socket configuration (TCP_NODELAY, keepalive, TCP_USER_TIMEOUT) -/// which is appropriate for non-TCP streams like Unix sockets. pub async fn handle_client_stream( mut stream: S, peer: SocketAddr, @@ -167,6 +162,7 @@ where } } + pub struct ClientHandler; pub struct RunningClientHandler { @@ -418,9 +414,9 @@ impl RunningClientHandler { /// Main dispatch after successful handshake. /// Two modes: - /// - Direct: TCP relay to TG DC (existing behavior) + /// - Direct: TCP relay to TG DC (existing behavior) /// - Middle Proxy: RPC multiplex through ME pool (new — supports CDN DCs) - pub(crate) async fn handle_authenticated_static( + async fn handle_authenticated_static( client_reader: CryptoReader, client_writer: CryptoWriter, success: HandshakeSuccess,