ClientToProxyConnection( final DefaultHttpProxyServer proxyServer, SslEngineSource sslEngineSource, boolean authenticateClients, ChannelPipeline pipeline, GlobalTrafficShapingHandler globalTrafficShapingHandler) { super(AWAITING_INITIAL, proxyServer, false); initChannelPipeline(pipeline); if (sslEngineSource != null) { LOG.debug("Enabling encryption of traffic from client to proxy"); encrypt(pipeline, sslEngineSource.newSslEngine(), authenticateClients) .addListener( new GenericFutureListener<Future<? super Channel>>() { @Override public void operationComplete( Future<? super Channel> future) throws Exception { if (future.isSuccess()) { clientSslSession = sslEngine .getSession(); recordClientSSLHandshakeSucceeded(); } } }); } this.globalTrafficShapingHandler = globalTrafficShapingHandler; LOG.debug("Created ClientToProxyConnection"); }
ClientToProxyConnection( final DefaultHttpProxyServer proxyServer, SslEngineSource sslEngineSource, boolean authenticateClients, ChannelPipeline pipeline, GlobalTrafficShapingHandler globalTrafficShapingHandler) { super(AWAITING_INITIAL, proxyServer, false); initChannelPipeline(pipeline); if (sslEngineSource != null) { LOG.debug("Enabling encryption of traffic from client to proxy"); encrypt(pipeline, sslEngineSource.newSslEngine(), authenticateClients) .addListener( new GenericFutureListener<Future<? super Channel>>() { @Override public void operationComplete( Future<? super Channel> future) throws Exception { if (future.isSuccess()) { clientSslSession = sslEngine .getSession(); recordClientSSLHandshakeSucceeded(); } } }); } this.globalTrafficShapingHandler = globalTrafficShapingHandler; LOG.debug("Created ClientToProxyConnection"); }
ClientToProxyConnection( final DefaultHttpProxyServer proxyServer, SslEngineSource sslEngineSource, boolean authenticateClients, ChannelPipeline pipeline, GlobalTrafficShapingHandler globalTrafficShapingHandler) { super(AWAITING_INITIAL, proxyServer, false); initChannelPipeline(pipeline); if (sslEngineSource != null) { LOG.debug("Enabling encryption of traffic from client to proxy"); encrypt(pipeline, sslEngineSource.newSslEngine(), authenticateClients) .addListener( new GenericFutureListener<Future<? super Channel>>() { @Override public void operationComplete( Future<? super Channel> future) throws Exception { if (future.isSuccess()) { clientSslSession = sslEngine .getSession(); recordClientSSLHandshakeSucceeded(); } } }); } this.globalTrafficShapingHandler = globalTrafficShapingHandler; LOG.debug("Created ClientToProxyConnection"); }