Jeprotea wrote:
hi,Oleg
   According to your advices, I've tried it,the code is like this(partial):
.................
 PlainSocketFactory sf = PlainSocketFactory.getSocketFactory();
   Socket socket = sf.createSocket();
   socket.connect(new InetSocketAddress(proxyHost,proxyPort), 0);

   HttpParams params = new BasicHttpParams();
   params.setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 1000L);

  sf.connectSocket(socket, targetHost, targetPort, null, -1, params);
.....
 however,there is not a established state,only:
netstat -ano | findstr "1080"
  TCP    10.64.44.176:1080      0.0.0.0:0              LISTENING
2096
  TCP    10.64.44.176:2110      10.64.14.176:1080      SYN_SENT        1440

 if i 've made a mistake to create a socket connection for socks4 proxy ,via
using above funcations included in httpclient-4,I am a novice,~~please
forgive my mistakes, could you give me special advices or exaples for it.

thanks!


Jeprotea

I know next to nothing about the SOCKS protocol and am unable to help much. All I know is that SOCKS _should_ be completely transparent for the HTTP transport layer and should require no special configuration of HttpClient.

For details see:

http://en.wikipedia.org/wiki/SOCKS
http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to