class ConnectSuccessInterceptor {

    private static final Logger LOGGER = LoggerFactory.getLogger(ConnectSuccessInterceptor.class);

    private final ChannelManager channelManager;
    private final NettyRequestSender requestSender;

    ConnectSuccessInterceptor(ChannelManager channelManager, NettyRequestSender requestSender) {
        this.channelManager = channelManager;
        this.requestSender = requestSender;
    }

    public boolean exitAfterHandlingConnect(Channel channel, NettyResponseFuture<?> future, Request request, ProxyServer proxyServer) {<FILL_FUNCTION_BODY>}
}

        if (future.isKeepAlive()) {
            future.attachChannel(channel, true);
        }

        Uri requestUri = request.getUri();
        LOGGER.debug("Connecting to proxy {} for scheme {}", proxyServer, requestUri.getScheme());
        final Future<Channel> whenHandshaked = channelManager.updatePipelineForHttpTunneling(channel.pipeline(), requestUri);
        future.setReuseChannel(true);
        future.setConnectAllowed(false);

        Request targetRequest = future.getTargetRequest().toBuilder().build();
        if (whenHandshaked == null) {
            requestSender.drainChannelAndExecuteNextRequest(channel, future, targetRequest);
        } else {
            requestSender.drainChannelAndExecuteNextRequest(channel, future, targetRequest, whenHandshaked);
        }

        return true;
    
<no_super_class>