@ Override public void lookupChainedProxies ( HttpRequest request , Queue < ChainedProxy > chainedProxies ) { final InetSocketAddress originalProxy = originalProxies . get ( URI . create ( request . getUri ( ) ) . getScheme ( ) ) ; if ( originalProxy != null ) { ChainedProxy chainProxy = new ChainedProxyAdapter ( ) { @ Override public InetSocketAddress getChainedProxyAddress ( ) { return originalProxy ; } } ; chainedProxies . add ( chainProxy ) ; } else { chainedProxies . add ( ChainedProxyAdapter . FALLBACK_TO_DIRECT_CONNECTION ) ; } }
Used by LittleProxy to connect to a downstream proxy if there is one .