You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Matt Bialek <ma...@gmail.com> on 2014/04/24 19:10:20 UTC

Proxy Chaining in httpclient 4.3

Hello,
I am attempting to implement proxy chaining, I know it is not supported out
of the box but my project uses httpclient and they are stubborn about using
it. I sent up a custom MainClientExec and created a method for tunnel to
Proxy. What i dont understand is the comment in the source code of:

route:  source --> p1 -->p2 --> target
fact = source -->p1 --> target

Why does this get rid of the 2nd proxy? In my attempts to get functionality
i have had it where it fails to authenticate in the first hop or it
authenticates the first hop and attempts to connect to the end point by
passing the 2nd proxy which of course fails. I have read the comments on
the source code and could use some direction. Both of my proxies utilize
BASIC AUTH and same username/password so the situation should be fairly
simple.

I appear to have managed it to be in a state where it attempts to invoke
the target but the connection is always reset

Any help would be appreciated!

-- 
Matthew Bialek

Re: Proxy Chaining in httpclient 4.3

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2014-04-24 at 13:10 -0400, Matt Bialek wrote:
> Hello,
> I am attempting to implement proxy chaining, I know it is not supported out
> of the box but my project uses httpclient and they are stubborn about using
> it. I sent up a custom MainClientExec and created a method for tunnel to
> Proxy. What i dont understand is the comment in the source code of:
> 
> route:  source --> p1 -->p2 --> target
> fact = source -->p1 --> target
> 

Where exactly is this comment? What class?

> Why does this get rid of the 2nd proxy? In my attempts to get functionality
> i have had it where it fails to authenticate in the first hop or it
> authenticates the first hop and attempts to connect to the end point by
> passing the 2nd proxy which of course fails. I have read the comments on
> the source code and could use some direction. Both of my proxies utilize
> BASIC AUTH and same username/password so the situation should be fairly
> simple.
> 
> I appear to have managed it to be in a state where it attempts to invoke
> the target but the connection is always reset
> 
> Any help would be appreciated!
> 

I would recommend trying to get proxy chaining to work without
authentication first. HttpClient authentication framework presently
maintains only a single proxy auth state object, which basically makes
authentication with multiple proxies impossible. Making HC capable of
maintaining multiple proxy auth states is likely to require major
alterations to the auth framework and therefore may only be possible in
5.0.

Oleg   



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org