if (future.isKeepAlive())
future.attachChannel(channel, true);
try {
Uri requestUri = request.getUri();
String scheme = requestUri.getScheme();
String host = requestUri.getHost();
int port = getDefaultPort(requestUri);
logger.debug("Connecting to proxy {} for scheme {}", proxyServer, scheme);
channelManager.upgradeProtocol(channel.pipeline(), scheme, host, port);