thaliproject / Tor_Onion_Proxy_Library

Provides a JAR and an AAR for embedding the Tor Onion Proxy into a Java or Android Program
Apache License 2.0
175 stars 98 forks source link

syntax error: unexpected '$4��g4' #48

Open CoreDev333 opened 5 years ago

CoreDev333 commented 5 years ago

I'm trying to use this library on Android but after make universal and android build I've tried to inicialize Tor as described on samples. Turn's out this error came everytime.

I/OnionProxyManager: Starting Tor
W/OnionProxyManager: Tor exited with value 1
E/TorTest: Couldn't start Tor!
E/OnionProxyManager: /data/user/0/org.thoughtcrime.securesms/app_torfiles/tor[1]: syntax error: unexpected '$4��g4'

Also I have to comment on OnionProxyManager.java because there is no such method on Control Connection.

line 391  // controlConnection.takeOwnership();
CoreDev333 commented 5 years ago

While debugging I found where error came from:

try {
  torProcess = processBuilder.start();
  CountDownLatch controlPortCountDownLatch = new CountDownLatch(1);
  eatStream(torProcess.getInputStream(), false, controlPortCountDownLatch);
  eatStream(torProcess.getErrorStream(), true, null);

at line 364 on class OnionProxyManager. When ErrorStream is consumed I got the error described above.

Everything was working ok until it. Variebles getting values, context passing between classes.

JesusMcCloud commented 5 years ago

Try https://github.com/JesusMcCloud/netlayer for far more up-to-date tor bindings

CoreDev333 commented 5 years ago

@JesusMcCloud I will look into it. Is this repo suitable for android?

Actually not https://github.com/JesusMcCloud/netlayer/issues/10

yaronyg commented 5 years ago

Yeah to be clear, nobody is supporting this repo anymore. I don't have time to sleep these days much less handle side projects. :(