}
private void enableSocks(ChannelHandlerContext ctx) {
ChannelPipeline pipeline = ctx.pipeline();
pipeline.addLast(SocksInitRequestDecoder.class.getSimpleName(), new SocksInitRequestDecoder());
pipeline.addLast(SocksMessageEncoder.class.getSimpleName(), new SocksMessageEncoder());
pipeline.addLast(HttpProxyHandler.class.getSimpleName(), new HttpProxyHandler(logFilter, null, new InetSocketAddress(port), sslEnabled));
// re-unify
pipeline.addLast("socksUnification", new ProxyUnificationHandler(sslEnabled, false, port));
pipeline.remove(this);