Hello all,

i have been using HttpClient with much success in a proxy-like
environment, where HttpClient is used as for the client part. I now
need to bypass the system's resolver library, and make sure i use a
specific DNS server selected based on the URL requested or any other
parameter in the request (if the host/domain name was the only
parameter, i could use a custom configuration for bind).

I have been playing with dnsjava (www.dnsjava.org), and manage to
query several DNS servers and cache responses very effectively.

Now i need to plug everything together.

I have been exploring implementing my own ProtocolSocketFactory which
would return Socket with host names resolved as specified in the
requirements. Now the problem is that there is only one
ProtocolSocketFactory defined at any time in the HttpClient API. So
using Protocol.registerProtocol() as documented will lead to
inconsistencies in name resolving for existing ConnectionManager
instances.

I'm not sure i've made myself clear, but is there any other way i
could plug my own SocketFactory at the HttpConnection level ?

The other solution i've been thinking about is to use the JDK
SocketFactory mechanism at lower level, but i'm not sure where i
should start from ...

Any idea ?

Thanks much in advance.

Erwan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to