3 Replies - 4386 Views - Last Post: 24 September 2012 - 04:30 PM Rate Topic: -----

#1 HapticThreek  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 78
  • Joined: 20-October 11

Using java to access Tor anonymous network (.onion URLs)?

Posted 24 September 2012 - 01:14 PM

Does anyone know if there is a simple way to get Java to access .onion web addresses on the anonymous Tor network?

At the moment I have it accessing regular web addresses like so:
URL url = new URL(http://google.co.uk/);
            BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream())


I would like it to connect to Tor sites like this one "http://torlinkbgs6aabns.onion/" with .onion domains, does anyone know how, or if its even possible?

Thanks in advance :)

Is This A Good Question/Topic? 0
  • +

Replies To: Using java to access Tor anonymous network (.onion URLs)?

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10596
  • View blog
  • Posts: 39,259
  • Joined: 27-December 08

Re: Using java to access Tor anonymous network (.onion URLs)?

Posted 24 September 2012 - 01:50 PM

Have you tried it? I don't see why there would be a problem.
Was This Post Helpful? 0
  • +
  • -

#3 HapticThreek  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 78
  • Joined: 20-October 11

Re: Using java to access Tor anonymous network (.onion URLs)?

Posted 24 September 2012 - 02:19 PM

View Postmacosxnerd101, on 24 September 2012 - 01:50 PM, said:

Have you tried it? I don't see why there would be a problem.


Yeah I tried it and used exception.printStackTrace() and it showed this:

java.net.UnknownHostException: torlinkbgs6aabns.onion
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at sun.net.NetworkClient.doConnect(Unknown Source)
	at sun.net.www.http.HttpClient.openServer(Unknown Source)
	at sun.net.www.http.HttpClient.openServer(Unknown Source)
	at sun.net.www.http.HttpClient.<init>(Unknown Source)
	at sun.net.www.http.HttpClient.New(Unknown Source)
	at sun.net.www.http.HttpClient.New(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
	at java.net.URL.openStream(Unknown Source)


I should say that you have to be connected to the Tor network to access .onion domains. I am connected to it but only through the modified TorBrowser version of Firefox. I think if I could configure a proxy for Java then I might be able to get it working...

This post has been edited by HapticThreek: 24 September 2012 - 02:20 PM

Was This Post Helpful? 0
  • +
  • -

#4 Ghlavac  Icon User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 519
  • Joined: 14-January 09

Re: Using java to access Tor anonymous network (.onion URLs)?

Posted 24 September 2012 - 04:30 PM

Use one of these

http://sourceforge.n...TorJavaOverview
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1