Hi, I'm currently writing an application that needs to hit two different webapps, one using a socks server, and another one that does not need to use the socks server. What I would like is to use the socks server only for the connection that needs it, and not for the other (because I want to avoid the eventual slowlinesses of the socks server).
According to the httpclient documentation, it seems that the only way to use a socks proxy is to set it up for the whole JVM (with socksProxyHost and socksProxyPort system parameters), what means that all HTTP connections will use socks :( So my question is : Is there a way to tell httpclient to build specific socks connections, as it is possible to do using the legacy java.net API ? Example : SocketAddress addr = new InetSocketAddress(host,port); Proxy proxy = new Proxy(Proxy.Type.SOCKS, addr); URLConnection conn = url.openConnection(proxy); InputStream result = new DataInputStream(conn.getInputStream()); I've looked at the source code and I've finally found no way to be able to reach the socks server... I systematically get I/O timeout errors :( Thanks a lot, Sebastien. _________________________________________________________________ Votre contact a choisi Hotmail, l'e-mail nouvelle génération. Créez un compte. http://www.windowslive.fr/hotmail/default.asp --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
