Library to torify application - NOTE: upstream has been moved to https://gitweb.torproject.org/torsocks.git https://github.com/dgoulet/torsocks
Go to file
Ola Bini d4b0a84bdf Fixes an issue when calling recvmsg on a domain socket non-blocking
Since the original flags are not taken into account when peeking, the peek
recvmsg call will hang forever in certain circumstances, including in all QT
applications running Wayland. This fix simply adds the original flags, so that
the peeking recvmsg call might be nonblocking, if the original call was
nonblocking.

Closes #40001
2020-10-27 09:58:16 -04:00
config Add hardening compile and linker flags 2013-11-12 17:55:50 -05:00
doc Add a -q/--quiet to torsocks 2017-02-24 15:16:24 -05:00
extras Extras: add bash and zsh completion file 2014-03-03 16:47:45 -05:00
include Add config/ and include/ dir in the repository and update gitignore 2013-06-02 11:55:57 -04:00
src Fixes an issue when calling recvmsg on a domain socket non-blocking 2020-10-27 09:58:16 -04:00
tests gethostbyaddr_r: Don't put garbage in data->hostname 2018-04-20 12:04:35 -04:00
.gitignore Use xz for dist tarball now 2016-10-18 12:39:02 -04:00
.travis.yml Add libtool to .travis.yml 2013-04-19 10:25:52 -07:00
ChangeLog Update version to v2.3.0 2018-11-19 10:42:40 -05:00
INSTALL Update INSTALL file and autogen.sh 2013-08-23 18:40:26 -04:00
LICENSE Fix: add LICENSE file to repository 2014-08-11 09:48:37 -04:00
Makefile.am Extras: add bash and zsh completion file 2014-03-03 16:47:45 -05:00
README.md Merge remote-tracking branch 'upstream/master' 2018-04-20 09:16:48 -04:00
autogen.sh Update INSTALL file and autogen.sh 2013-08-23 18:40:26 -04:00
configure.ac Update version to v2.3.0 2018-11-19 10:42:40 -05:00
gpl-2.0.txt Add gpl v2 license file 2013-08-23 18:43:25 -04:00

README.md

Build Status

What is torsocks?

Torsocks allows you to use most applications in a safe way with Tor. It ensures that DNS requests are handled safely and explicitly rejects any traffic other than TCP from the application you're using.

Torsocks is an ELF shared library that is loaded before all others. The library overrides every needed Internet communication libc function calls such as connect(2) or gethostbyname(3).

BE ADVISE: It uses the LD_PRELOAD mechanism (man ld.so.8) which means that if the application is not using the libc or for instance uses raw syscalls, torsocks will be useless and the traffic will not go through Tor.

This process is transparent to the user and if torsocks detects any communication that can't go through the Tor network such as UDP traffic, for instance, the connection is denied. If, for any reason, there is no way for torsocks to provide the Tor anonymity guarantee to your application, torsocks will force the application to quit and stop everything.

Requirements

- autoconf
- automake
- libtool
- gcc

Installation

$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

If you are compiling it from the git repository, run ./autogen.sh before the configure script.

Using torsocks

Once you have installed torsocks, just launch it like so:

$ torsocks [application]

So, for example you can use ssh to a some.ssh.com by doing:

$ torsocks ssh username@some.ssh.com

You can use the torsocks library without the script provided:

$ LD_PRELOAD=/full/path/to/libtorsocks.so your_app

For more details, please see the torsocks.1, torsocks.8 and torsocks.conf.5 man pages. Also, you can use -h, --help for all the possible options of the torsocks script.

A configuration file named torsocks.conf is also provided for the user to control some parameters.

More informations

torsocks is distributed under the GNU General Public License version 2.

Mailing list for help is tor-talk@lists.torproject.org and for development use tor-dev@lists.torproject.org. You can find the project also on IRC server irc.oftc.net (OFTC) in #tor and #tor-dev.

See more information about the Tor project at https://www.torproject.org.