TORSOCKS(1)
๐ 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 withLD_PRELOADincludingtorsocks(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 onstderr. loud and proud ๐ข-q,--quietโ suppresses every log message. even the errors. absolute silence. ๐คซon|offโ this option adds or removestorsocks(8)from theLD_PRELOADenvironment variable for the current shell. โ ๏ธ if you wanna use this one, you HAVE to sourcetorsocksfrom 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 theLD_PRELOADenvironment 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 ๐โจ
๐ฆ where this page comes from
- alpine 3.24: torsocks-doc 2.5.0-r0 ยท GPL-2.0
- arch rolling: torsocks 2.5.0-1 ยท GPL-2.0-or-later
- debian trixie: torsocks 2.5.0-1+deb13u1 ยท GPL-2.0-or-later
- nixos 26.05: torsocks 2.5.0
- nixpkgs unstable: torsocks 2.5.0
- ubuntu questing: torsocks 2.5.0-1
- ubuntu resolute: torsocks 2.5.0-6 ยท GPL-2.0-or-later
- ubuntu stonking: torsocks 2.5.0-6 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms