TORSOCKS(1)

๐Ÿ“ฆ
version 2.5.0 ยท 2 versions
, in alpine 3.24, arch rolling, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’… TORSOCKS โ€” the torify glow-up wrapper

okay bestie, welcome to torsocks, from section 1 of the manual ๐ŸŽ€ it's a shell wrapper that makes using the torsocks(8) library way easier, so you can transparently torify basically any application. yes queen, transparently. like it's not even trying. โœจ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

torsocks [OPTIONS] [COMMAND [ARG ...]]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So here's the tea: torsocks is the lil' middleman (a wrapper) hanging out between the torsocks library and your application, and its whole job is making every single Internet communication go through the Tor network. no cap. every one. ๐Ÿซถ

By default, torsocks assumes it should connect to the Tor SOCKS proxy chillin' at 127.0.0.1 on port 9050 โ€” those are the defaults of the Tor daemon, so honestly it just knows. ๐Ÿ’…

Wanna use a config file? It tries to read /etc/tor/torsocks.conf first, or it'll go looking for the environment variable TORSOCKS_CONF_FILE holding the location of the file. And if that file simply cannot be read? It does not panic, bestie, it just falls back on sensible defaults that work for most Tor installations. iconique behaviour tbh. โœจ

for even more deets on configuration, go read torsocks.conf(5). iykyk ๐Ÿ“–

โœจ OPTIONS โœจ

  • -h, --help โ€” shows you a lil' summary of all the possible options and commands. your friendly map ๐Ÿ—บ๏ธ
  • --shell โ€” creates a brand new shell with LD_PRELOAD including torsocks(8). new shell, who dis ๐Ÿš
  • --version โ€” shows the version. flex the build ๐Ÿ’…
  • -u, --user โ€” sets the username for the SOCKS5 authentication. use it for circuit isolation in Tor. โš ๏ธ and note that you MUST have a password set, either by the command line, environment variable or configuration file (torsocks.conf(5)). no password, no party.
  • -p, --pass โ€” sets the password for the SOCKS5 authentication. use it for circuit isolation in Tor. โš ๏ธ and note that you MUST have a username set, either by the command line, environment variable or configuration file (torsocks.conf(5)). they're a package deal fr fr.
  • -a, --address โ€” sets the Tor address. accepts only numeric addresses, so don't be trying to be cute with hostnames here.
  • -P, --port โ€” sets the Tor port. ๐Ÿ”Œ
  • -i, --isolate โ€” automatic tor isolation ๐Ÿงš it sets the username and password for the SOCKS5 authentication method to a PID/current time based value, automatically, like magic. โš ๏ธ but listen: Username and Password MUST NOT be set. do not mix, bestie.
  • -6, --ipv6 โ€” enables the creation of ipv6 sockets. six-y and thriving ๐ŸŒˆ
  • -d, --debug โ€” activates debug mode. output gets written on stderr. loud and proud ๐Ÿ“ข
  • -q, --quiet โ€” suppresses every log message. even the errors. absolute silence. ๐Ÿคซ
  • on | off โ€” this option adds or removes torsocks(8) from the LD_PRELOAD environment variable for the current shell. โš ๏ธ if you wanna use this one, you HAVE to source torsocks from your shell. no sourcing, no switching.

Add the torsocks library to LD_PRELOAD

$ . torsocks on

Remove the torsocks library from LD_PRELOAD

$ . torsocks off
  • show | sh โ€” shows the current value of the LD_PRELOAD environment variable. vibe check on your env ๐Ÿ‘€

๐ŸŒˆ ENVIRONMENT VARIABLES ๐ŸŒˆ

pls go see torsocks(8) for way more detail on all the possible environment variables, that's where the full lore lives ๐Ÿ“š


๐Ÿ’– SEE ALSO ๐Ÿ’–


๐Ÿ‘‘ CREDITS ๐Ÿ‘‘

torsocks is distributed under the GNU General Public License version 2. slay, legally ๐ŸŽ€

There's a Web site at https://www.torproject.org if you want more information. ๐ŸŒ

You can also find the source code at https://git.torproject.org. go look, it's giving open source ๐Ÿ’…

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. come hang out, the group chat is literally right there ๐Ÿซถ


โญ AUTHOR โญ

torsocks was originally written by Robert Hogan and has been rewritten by David Goulet <dgoulet@torproject.org> in 2013. two icons, one legacy ๐Ÿ’–


and that's the whole page, bestie! this one's dated March 3rd, 2014, and it's TORSOCKS(1) โ€” go torify something cute. mwah ๐Ÿ’‹โœจ