Giter Site home page Giter Site logo

panagiotisdrakatos / t0rlib4j Goto Github PK

View Code? Open in Web Editor NEW
51.0 7.0 11.0 8.14 MB

T0rlib4j is a Java controller library for Tor

License: Apache License 2.0

Java 100.00%
java tor-network java-library hidden-services tor tor-process tor-users guardian

t0rlib4j's People

Contributors

panagiotisdrakatos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

t0rlib4j's Issues

Unable to load Config file (torrc.txt)

# 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

Catching: OnionProxyManager - Tor is not running

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.

Client-Server instance on same machine support?

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).

No support for Linux

This library only supports Windows. Tor binaries for Linux (both x86 and x64) are not included.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.