@Override protected void writeHttp(HttpObject httpObject) { if (chainedProxy != null) { chainedProxy.filterRequest(httpObject); } if (httpObject instanceof HttpRequest) { HttpRequest httpRequest = (HttpRequest) httpObject; // Remember that we issued this HttpRequest for later currentHttpRequest = httpRequest; } super.writeHttp(httpObject); }
public InetSocketAddress getChainedProxyAddress() { return chainedProxy == null ? null : chainedProxy .getChainedProxyAddress(); }
if (chainedProxy != null && chainedProxy != ChainedProxyAdapter.FALLBACK_TO_DIRECT_CONNECTION) { this.transportProtocol = chainedProxy.getTransportProtocol(); this.chainedProxyType = chainedProxy.getChainedProxyType(); this.localAddress = chainedProxy.getLocalAddress(); this.remoteAddress = chainedProxy.getChainedProxyAddress(); this.remoteAddressResolver = DefaultAddressResolverGroup.INSTANCE; this.username = chainedProxy.getUsername(); this.password = chainedProxy.getPassword(); } else { this.transportProtocol = TransportProtocol.TCP;
if (chainedProxy != null && chainedProxy != ChainedProxyAdapter.FALLBACK_TO_DIRECT_CONNECTION) { this.transportProtocol = chainedProxy.getTransportProtocol(); this.remoteAddress = chainedProxy.getChainedProxyAddress(); this.localAddress = chainedProxy.getLocalAddress(); } else { this.transportProtocol = TransportProtocol.TCP;
.then(ConnectChannel); if (chainedProxy != null && chainedProxy.requiresEncryption()) { connectionFlow.then(serverConnection.EncryptChannel(chainedProxy .newSslEngine()));
@Override protected void disconnected() { super.disconnected(); if (this.chainedProxy != null) { // Let the ChainedProxy know that we disconnected try { this.chainedProxy.disconnected(); } catch (Exception e) { LOG.error("Unable to record connectionFailed", e); } } clientConnection.serverDisconnected(this); }
this.chainedProxy.connectionSucceeded(); } catch (Exception e) { LOG.error("Unable to record connectionSucceeded", e);
LOG.info("Connection to upstream server via chained proxy failed", cause); chainedProxy.connectionFailed(cause); } else { LOG.warn("Connection to upstream server failed,{}", cause.getMessage());
if (chainedProxy != null && chainedProxy != ChainedProxyAdapter.FALLBACK_TO_DIRECT_CONNECTION) { this.transportProtocol = chainedProxy.getTransportProtocol(); this.remoteAddress = chainedProxy.getChainedProxyAddress(); this.localAddress = chainedProxy.getLocalAddress(); } else { this.transportProtocol = TransportProtocol.TCP;
.then(ConnectChannel); if (chainedProxy != null && chainedProxy.requiresEncryption()) { connectionFlow.then(serverConnection.EncryptChannel(chainedProxy .newSslEngine()));
@Override protected void disconnected() { super.disconnected(); if (this.chainedProxy != null) { // Let the ChainedProxy know that we disconnected try { this.chainedProxy.disconnected(); } catch (Exception e) { LOG.error("Unable to record connectionFailed", e); } } clientConnection.serverDisconnected(this); }
this.chainedProxy.connectionSucceeded(); } catch (Exception e) { LOG.error("Unable to record connectionSucceeded", e);
LOG.info("Connection to upstream server via chained proxy failed", cause); chainedProxy.connectionFailed(cause); } else { LOG.info("Connection to upstream server failed", cause);
if (chainedProxy.requiresEncryption()) { connectionFlow.then(serverConnection.EncryptChannel(chainedProxy.newSslEngine()));
@Override protected void writeHttp(HttpObject httpObject) { if (chainedProxy != null) { chainedProxy.filterRequest(httpObject); } if (httpObject instanceof HttpRequest) { HttpRequest httpRequest = (HttpRequest) httpObject; // Remember that we issued this HttpRequest for later currentHttpRequest = httpRequest; } super.writeHttp(httpObject); }
public InetSocketAddress getChainedProxyAddress() { return chainedProxy == null ? null : chainedProxy .getChainedProxyAddress(); }
@Override protected void disconnected() { super.disconnected(); if (this.chainedProxy != null) { // Let the ChainedProxy know that we disconnected try { this.chainedProxy.disconnected(); } catch (Exception e) { LOG.error("Unable to record connectionFailed", e); } } clientConnection.serverDisconnected(this); }
this.chainedProxy.connectionSucceeded(); } catch (Exception e) { LOG.error("Unable to record connectionSucceeded", e);
LOG.info("Connection to upstream server via chained proxy failed", cause); chainedProxy.connectionFailed(cause); } else { LOG.info("Connection to upstream server failed", cause);
@Override protected void writeHttp(HttpObject httpObject) { if (chainedProxy != null) { chainedProxy.filterRequest(httpObject); } if (httpObject instanceof HttpRequest) { HttpRequest httpRequest = (HttpRequest) httpObject; // Remember that we issued this HttpRequest for later currentHttpRequest = httpRequest; } super.writeHttp(httpObject); }