0

Take this code into consideration:

 Proxy p = new Proxy(Type.SOCKS, new InetSocketAddress(proxyURL, port));
 try {
 long time = System.currentTimeMillis();
 URLConnection urlConn = url.openConnection(p);
 System.out.println(urlConn.getContent());
 int ping = (int)(System.currentTimeMillis() - time);
 System.out.println(proxyURL+ ":" +port+ " ... works as SOCKS, ping: " +ping); 
 } catch (IOException e) {
 //e.printStackTrace();
 }

I have verified though Wireshark that this doesn't work on a valid socks4 proxy. At this time these are valid socks4 ONLY proxy servers:

92.241.233.75:1080
58.214.5.162:1080
222.51.38.138:1080
121.8.124.42:1080
220.179.61.62:1080
75.125.63.178:1080
201.59.145.141:1080
117.20.60.144:1080

Yet, feed it a valid socks5 proxy and it works fine:

 62.243.224.179
asked Feb 27, 2010 at 0:58
2
  • Which JDK are you using? Commented Feb 27, 2010 at 1:04
  • Java-6-openjdk is the one I'm using. Kind of new to linux/ubuntu plus I actually haven't been doing a lot of java lately either. Commented Feb 27, 2010 at 13:16

1 Answer 1

1

Here is an answer. I didn't test it, but sounds like it'll work (but not an ideal solution).

answered Feb 27, 2010 at 1:02
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.