panagiotisdrakatos / t0rlib4j Goto Github PK
View Code? Open in Web Editor NEWT0rlib4j is a Java controller library for Tor
License: Apache License 2.0
T0rlib4j is a Java controller library for Tor
License: Apache License 2.0
Hello, I'm completely new to tor and tor-java implementation. I've attempted to start a tor service with this library using the example code on the READMME.md but crashed with the following error: https://hastebin.com/nixekisopi.tex
This is my whole code:
The linux compatibilty is not added to the latest release. Took me ages to figure it out ๐
# Unable to load tor config file. Here is the whole debug message when trying to run ServerSocketViaTor.java file from samples:
[main] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Tor is not running
[main] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Starting Tor
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Apr 14 01:07:32.418 [notice] Tor 0.3.2.9 running on Linux with Libevent 2.0.22-stable, OpenSSL 1.0.2l, Zlib 1.2.8, Liblzma N/A, and Libzstd N/A.
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Apr 14 01:07:32.418 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Apr 14 01:07:32.418 [notice] Read configuration file "/home/nandan/IdeaProjects/T0rlib4j/torfiles/torrc.txt".
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Apr 14 01:07:32.423 [warn] Path for GeoIPFile (geoip.txt) is relative and will resolve to /home/nandan/IdeaProjects/T0rlib4j/torfiles/geoip.txt. Is this what you wanted?
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Apr 14 01:07:32.423 [warn] Path for GeoIPv6File (geoip6.txt) is relative and will resolve to /home/nandan/IdeaProjects/T0rlib4j/torfiles/geoip6.txt. Is this what you wanted?
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Apr 14 01:07:32.423 [warn] Path for PidFile (pid) is relative and will resolve to /home/nandan/IdeaProjects/T0rlib4j/torfiles/pid. Is this what you wanted?
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Apr 14 01:07:32.423 [warn] Failed to parse/validate config: You have specified at least one relative path (see above) with the RunAsDaemon option. RunAsDaemon is not compatible with relative paths.
[main] WARN com.msopentech.thali.java.toronionproxy.OnionProxyManager - Tor exited with value 1
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Apr 14 01:07:32.423
[err] Reading config failed--see warnings above.
Exception in thread "main" java.io.IOException: Could not Start Tor.
at net.sf.T0rlib4j.controller.network.JavaTorRelay.initTor(JavaTorRelay.java:59)
at net.sf.T0rlib4j.controller.network.JavaTorRelay.(JavaTorRelay.java:24)
at net.sf.T0rlib4j.samples.Server.ServerSocketViaTor.main(ServerSocketViaTor.java:29)
Process finished with exit code 1
Hi. I'm trying to run code from Readme.md and catching:
[main] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Tor is not running
Exception in thread "main" java.lang.RuntimeException: could not make Tor executable.
at com.msopentech.thali.java.toronionproxy.OnionProxyManager.installAndConfigureFiles(OnionProxyManager.java:462)
at com.msopentech.thali.java.toronionproxy.OnionProxyManager.installAndStartTorOp(OnionProxyManager.java:324)
at com.msopentech.thali.java.toronionproxy.OnionProxyManager.startWithRepeat(OnionProxyManager.java:96)
at net.sf.T0rlib4j.controller.network.JavaTorRelay.initTor(JavaTorRelay.java:58)
at net.sf.T0rlib4j.controller.network.JavaTorRelay.<init>(JavaTorRelay.java:24)
at ServerSocketViaTor.main(ServerSocketViaTor.java:25)
Is there some samples except those that are in Readme.md?
(Perhaps I did not quite correctly understand what the library is for.)
I found there new files: tor.exe, tor-gencert.exe
Also, I'm using linux. (Ubuntu 16.04)
UPD: I downloaded zip from https://github.com/PanagiotisDrakatos/T0rlib4j/blob/30feaf5d658a4ee7a7142630238eeab569d3211e/src/Tor/native/linux/x64/tor.zip and extracted it into tordir. Now I have this:
[main] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Tor is not running
[main] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Starting Tor
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.584 [notice] Tor 0.3.2.9 running on Linux with Libevent 2.0.22-stable, OpenSSL 1.0.2g, Zlib 1.2.8, Liblzma N/A, and Libzstd N/A.
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.584 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.584 [notice] Read configuration file "/home/allard/Documents/GitKraker/tor-java/tordir/torrc.txt".
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.588 [warn] Path for GeoIPFile (geoip.txt) is relative and will resolve to /home/allard/Documents/GitKraker/tor-java/tordir/geoip.txt. Is this what you wanted?
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.588 [warn] Path for GeoIPv6File (geoip6.txt) is relative and will resolve to /home/allard/Documents/GitKraker/tor-java/tordir/geoip6.txt. Is this what you wanted?
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.588 [warn] Path for PidFile (pid) is relative and will resolve to /home/allard/Documents/GitKraker/tor-java/tordir/pid. Is this what you wanted?
[main] WARN com.msopentech.thali.java.toronionproxy.OnionProxyManager - Tor exited with value 1
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.588 [warn] Failed to parse/validate config: You have specified at least one relative path (see above) with the RunAsDaemon option. RunAsDaemon is not compatible with relative paths.
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.588 [err] Reading config failed--see warnings above.
T0rlib4j is awesome and works as expected.
I am making a front end for a Tor Chatting Program that requires running both server and client at once on the same machine.
Since this feature is not supported as of now, can you give an estimate on when this patch will be released?
Or maybe suggest some kind of sandboxing of the processes. (I tried running separate thread of client and server but it rarely works).
This library only supports Windows. Tor binaries for Linux (both x86 and x64) are not included.
There are no files for linux. There is only for windows
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.