How can i establish a socket connection to an .onion url using SilverTunnel-NG on Android Studio? Is there any alternative?

时间:2015-05-12 22:13:35

标签: java android sockets

I am trying to use silvertunnel-ng in order to connect to a hidden service which i created with tor. If i use the code bellow from netbeans i can connect to the socket using the .onion url.

--

the libraries that i use are:

  • netlib-0.0.3.jar
  • bcprov-jdk15on-152.jar
  • bcpkix-jdk15on-152.jar
  • httpclient-4.1.2.jar
  • httpcore-4.1.2.jar
  • slf4j-api-1.7.12.jar
  • slf4j-jdk14-1.7.12.jar

when i transfer the project to android studio it works only if i use

  • netlib-0.0.4-SNAPSHOT.jar
  • sc-light-jdk15on-1.47.0.2.jar
  • slf4j-api-1.7.12.jar
  • slf4j-jdk14-1.7.12.jar

but the connection fails with a timeout error like that

final String HOST = "xw7pdude7qmfqiqim67f.onion";
final TcpipNetAddress proxyTcpipNetAddress = new TcpipNetAddress(HOST, 1444);
System.out.println("Connecting ");
socket = NetFactory.getInstance().getNetLayerById(NetLayerIDs.TOR_OVER_TLS_OVER_TCPIP).createNetSocket(null, null, proxyTcpipNetAddress);
System.out.println("Connected");

Has anyone managed to connect to an .onion url using silvertunnel-ng on android studio? Which libraries should i use? Is there an alternative to silvertunnel-ng?

1 个答案:

答案 0 :(得分:2)

好吧,几天前发布了silvertunnel-ng的新快照,问题解决了。我确认可以使用silvertunnel-ng从android连接到tor。