async fn establish_client_tcp_redir<'a>(
    context: Arc<ServiceContext>,
    balancer: PingBalancer,
    mut stream: TcpConnection,
    peer_addr: SocketAddr,
    addr: &Address,
) -> io::Result<()> {
    let server = balancer.best_tcp_server();
    let svr_cfg = server.server_config();

    let mut remote = AutoProxyClientStream::connect(context, &server, addr).await?;

    establish_tcp_tunnel(svr_cfg, &mut stream, &mut remote, peer_addr, addr).await
}
/// Established Client Transparent Proxy
///
/// This method must be called after handshaking with client (for example, socks5 handshaking)
Established Client Transparent Proxy
This method must be called after handshaking with client (for example, socks5 handshaking)
Established Client Transparent Proxy This method must be called after handshaking with client ( for example socks5 handshaking )
async fn establish_client_tcp_redir<'a>(
    context: Arc<ServiceContext>,
    balancer: PingBalancer,
    mut stream: TcpConnection,
    peer_addr: SocketAddr,
    addr: &Address,
) -> io::Result<()> {
    let server = balancer.best_tcp_server();
    let svr_cfg = server.server_config();
    let mut remote = AutoProxyClientStream::connect(context, &server, addr).await?;
    establish_tcp_tunnel(svr_cfg, &mut stream, &mut remote, peer_addr, addr).await
}
async fn establish_client_tcp_redir < ' a > ( context : Arc < ServiceContext > , balancer : PingBalancer , mut stream : TcpConnection , peer_addr : SocketAddr , addr : & Address , ) -> io :: Result < ( ) > { let server = balancer . best_tcp_server ( ) ; let svr_cfg = server . server_config ( ) ; let mut remote = AutoProxyClientStream :: connect ( context , & server , addr ) . await ? ; establish_tcp_tunnel ( svr_cfg , & mut stream , & mut remote , peer_addr , addr ) . await }
Established Client Transparent Proxy
This method must be called after handshaking with client (for example, socks5 handshaking)
Established Client Transparent Proxy This method must be called after handshaking with client ( for example socks5 handshaking )
context
Arc<ServiceContext>
balancer
PingBalancer
stream
TcpConnection
peer_addr
SocketAddr
addr
&Address
context
Arc<ServiceContext>
balancer
PingBalancer
stream
TcpConnection
peer_addr
SocketAddr
addr
&Address