clientEngine.setUseClientMode(true);
outboundChannel.pipeline().addLast("outbound relay ssl", new SslHandler(clientEngine));
}
Logger outboundLogger = LoggerFactory.getLogger(" -->");
if (logger.isDebugEnabled()) {
outboundChannel.pipeline().addLast("outbound relay logger", new LoggingHandler(outboundLogger));
}
outboundChannel.pipeline().addLast(new ProxyRelayHandler(ctx.channel(), 1048576, new RequestInterceptor(null), outboundLogger));
// upstream
if (secure) {
SSLEngine serverEngine = SSLFactory.getInstance().sslContext().createSSLEngine();
serverEngine.setUseClientMode(false);
ctx.channel().pipeline().addLast("upstream relay ssl", new SslHandler(serverEngine));
}
Logger inboundLogger = LoggerFactory.getLogger("<-- ");
if (logger.isDebugEnabled()) {
ctx.channel().pipeline().addLast("upstream relay logger", new LoggingHandler(inboundLogger));
}
ctx.channel().pipeline().addLast(new ProxyRelayHandler(outboundChannel, 1048576, new ResponseInterceptor(), inboundLogger));
}
});
} else {