Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Linux x64 binaries are unresolved + demo failing #9

Closed
elect86 opened this issue Feb 23, 2018 · 2 comments
Closed

Linux x64 binaries are unresolved + demo failing #9

elect86 opened this issue Feb 23, 2018 · 2 comments

Comments

@elect86
Copy link

elect86 commented Feb 23, 2018

Hi Jesus,

so, I cloned your repo for a potential Android implementation, but at first I got this:

Exception in thread "main" org.berndpruenster.netlayer.tor.TorCtlException
	at org.berndpruenster.netlayer.tor.Tor.<init>(Tor.kt:145)
	at org.berndpruenster.netlayer.tor.NativeTor.<init>(NativeTor.kt:55)
	at org.berndpruenster.netlayer.tor.demo.DemoKt.main(Demo.kt:30)
Caused by: java.io.IOException: Could not load native/linux/x64/tor.tar.xz
	at org.berndpruenster.netlayer.tor.NativeContext.getAssetOrResourceByName(NativeTor.kt:97)
	at org.berndpruenster.netlayer.tor.NativeContext.installFiles(NativeTor.kt:106)
	at org.berndpruenster.netlayer.tor.TorContext.installAndConfigureFiles(TorContext.kt:329)
	at org.berndpruenster.netlayer.tor.TorContext.installAndStartTorOp$tor(TorContext.kt:236)
	at org.berndpruenster.netlayer.tor.Tor.bootstrap(Tor.kt:170)
	at org.berndpruenster.netlayer.tor.Tor.bootstrap$default(Tor.kt:166)
	at org.berndpruenster.netlayer.tor.Tor.<init>(Tor.kt:143)
	... 2 more

Process finished with exit code 1

Then, I cloned your repo, few modification + Gradle and I didn't get that anymore, but now I get this here:

Exception in thread "main" tor.TorCtlException
	at tor.Tor.<init>(Tor.kt:143)
	at tor.NativeTor.<init>(NativeTor.kt:56)
	at tor.DemoKt.main(Demo.kt:26)
Caused by: java.io.IOException: Could not load geoip
	at tor.NativeContext.getAssetOrResourceByName(NativeTor.kt:93)
	at tor.TorContext.installFiles(TorContext.kt:131)
	at tor.NativeContext.installFiles(NativeTor.kt:98)
	at tor.TorContext.installAndConfigureFiles(TorContext.kt:265)
	at tor.TorContext.installAndStartTorOp$tor(TorContext.kt:186)
	at tor.Tor.bootstrap(Tor.kt:167)
	at tor.Tor.bootstrap$default(Tor.kt:163)
	at tor.Tor.<init>(Tor.kt:141)
	... 2 more

What am I supposed to have in my tor-demo directory?

@JesusMcCloud
Copy link
Owner

JesusMcCloud commented Feb 28, 2018

TL;DR: You will need to mvn install everything at least once

First of all, It is currently not possible to use it on Android.
To do so, you would need to provide native Android Tor binaries and perform some additional changes
(see https://github.com/ManfredKarrer/jtorproxy for inspiration).

About your issue: You are missing the actual tor binaries (you first error) or at least the platform-independent resources like geoip (your second output). Since I don't know how your gradle build file looks, this is hard to debug for me. These resources are part of external dependencies, you will need to mvn install everything at least once, as IDEs typically do not invoke maven to run code.

You are not supposed to put anything into the tor-demo directory. This should happen automagically.

(Yes, a Hacking.md would indeed be nice!)

@JesusMcCloud
Copy link
Owner

Closing, see also #10

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants