In the example ClientExecuteSOCKS.java you showed me: 1. Why isn't the SOCKS support built into httpclient instead of requiring users to do it themselves? HttpClient is already invovled with Socket level TCP/IP stuff, with all the socket factory stuff going on, which is where the SOCKS support needs to be implemented. 2. There is duplicated code between MySchemeSocketFactory, PlainSocketFactory, and ... I was about to say MultihomePlainSocketFactory but its deprecated now and I don't see its replacement. I think PSF should be non-final, and then why not bake SOCKS support right into PSF using new SOCKS HttpConnectionParams? 3. The code doesn't work for SSL. 4. ProxySelectorRoutePlanner still doesn't support SOCKS but it would be nice if it did. (I have no solution for this)
Last night I got the HTTPS side working and fortunately it didn't involve creating yet another socket factory. Based on HttpClient 4.0.3 code, I used a customized DefaultClientConnectionOperator which conditionally used my SocksSocketFactory in its openConnection()... I extended DCCO, overriding openConnection(), copy pasted (ugh!) DCCO's implementation and made some small changes. I see now that DCCO's code in trunk is different--it no longer knows anything about a Layered socket factory in openConnection(). I'll have to track down what changed and if that affects me. olegk wrote: > > SOCKS is an IP level protocol. As long as SOCKS proxying is configured > correctly on the TCP/IP level, no additional support is required on the > HTTP level. > > Ads far as I can tell HttpClient 4.1 makes it fairly easy to implement > socket layering over SOCKS. I am really not sure what kind of additional > support one may need in this regard. > > http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientExecuteSOCKS.java > > I could certainly make PlainSocketFactory non-final if that makes your > life easier. > > Oleg > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- View this message in context: http://old.nabble.com/SOCKS-support-is-absent-tp30238353p30248676.html Sent from the HttpClient-User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
