Skip to main content

Authenticating proxy in java

1 reply [Last post]
cpu2007
Offline
Joined: 2012-10-24

Hi
I hope someone can put some clarification on this problem that I'm having.
I am using Apache HTTPClient 4.2 library and I use proxies to connect to internet.
For normal proxies I don't have any problem and it goes through the proxy but I'm not sure how this works when the proxy requires an authentication.

Can someone tell the implementation required to authenticate the proxy via username and pass(which I have) and then connect via proxy to the internet?

In addition, is it possible to connect to multiple proxies? for example,assume that I want to connect to one proxy and then use that proxy to connect to another which then will connect to internet, is this achievable in Java using httpclient?

Any link containing guides,tutorial are welcome too :)

Thank you

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dgodbey
Offline
Joined: 2006-10-27

I recently had an issue when our exchange server shut down ntlm authentication requiring ntlm v2 authentication. I found and downloaded a component, cntlm, that claimed to solve my problem, but alas, I couldn't make it work.

What I did is to create an authenticating "proxy" servlet using httpclient for my jaxws web service. Now I'm back in business.

You can find a discussion of my issue in this forum.