TORSOCKS.CONF(5)
πΈ TORSOCKS.CONF(5) πΈ
okay bestie, welcome to the manual page for torsocks.conf β that's the configuration file for torsocks(8) π
this is section 5 of the manual, so you know it's the β¨file formatsβ¨ girlies. sit down, grab a strawberry π, we're doing this.
π NAME π
torsocks.conf β Configuration file for torsocks(8)
β¨ SUMMARY β¨
so by default, torsocks is just gonna assume it should connect to the Tor SOCKS proxy chillin' at 127.0.0.1 on port 9050. that's the default address and port for Tor's socks server on basically most installations, no cap. so if you're running a normal Tor setup and you have zero special requirements?? you literally do not need to create, edit, or invoke a configuration file when using torsocks. it's giving effortless. it's giving low-maintenance. π
your installation of torsocks includes a default configuration file that has values sensible for use with most Tor installations. the installation location for your default configuration file is:
/etc/tor/torsocks.conf
in order to use a configuration file, you must set the environment variable TORSOCKS_CONF_FILE with the location of the file. periodt.
if TORSOCKS_CONF_FILE is not set, torsocks will attempt to read the configuration file at /etc/tor/torsocks.conf. and if that file cannot be read?? torsocks will use sensible defaults for most Tor installations, i.e. it will assume that you want to use a SOCKS proxy running at 127.0.0.1 (localhost) on port 9050. she's got a fallback for everything, we love a prepared queen π
π¦ CONFIGURATION π¦
π SYNTAX π
the basic structure of all lines in the configuration file is:
<directive> <parameters>
empty lines are ignored and all input on a line after a # character is ignored. so comment away, bestie, live your truth π
π DIRECTIVES π
the following directives are used in the torsocks configuration file:
TorAddress ip_addrβ the IP address of the Tor SOCKS server (e.g"server = 10.1.4.253"). only one server may be specified. currently,torsocksdoes NOT support hostname. (default:127.0.0.1)TorPort portβ the port on which the Tor SOCKS server receives requests. (default:9050)OnionAddrRange subnet/maskβ Tor hidden sites do not have real IP addresses. this specifies what range of IP addresses will be handed to the application as "cookies" for.onionnames. of course, you should pick a block of addresses which you aren't going to ever need to actually connect to. this is similar to theMapAddressfeature of the main tor daemon. (default:127.42.42.0/24)SOCKS5Username usernameβ username to use for SOCKS5 authentication method that makes the connections to Tor to use a different circuit from other existing streams. if set, theSOCKS5Passwordmust be specified also. (Default: none).SOCKS5Password passwordβ password to use for SOCKS5 authentication method that makes the connections to Tor to use a different circuit from other existing streams. if set, theSOCKS5Usernamemust be specified also. (Default: none).AllowInbound 0|1β allow inbound connections meaning thatlisten()andaccept()/accept4()will be allowed for non localhost address so the application can handle incoming connection. note that Unix socket are allowed. (Default:0)AllowOutboundLocalhost 0|1|2β allow outbound connections to the loopback interface meaning thatconnect()will be allowed to connect to localhost addresses bypassing Tor. if set to1, TCP connections will be allowed. if set to2, both TCP/IP and UDP connections will be allowed. this option should not be used by most users. (Default:0)
π¨ bestie listen to me. AllowOutboundLocalhost is not for most users. do not just set it because it sounds fun. it bypasses Tor. that's the whole point of torsocks and you're out here handing it a hall pass π
IsolatePID 0|1β set Torsocks to use an automatically generated SOCKS5 username/password based on the process ID and current time, that makes the connections to Tor use a different circuit from other existing streams in Tor on a per-process basis. if set, theSOCKS5UsernameandSOCKS5Passwordoptions must not be set. (Default:0)
π₯ EXAMPLE π₯
$ export TORSOCKS_CONF_FILE=$PWD/torsocks.conf
$ torsocks ssh account@sshserver.com
look at her go. set the env var, run the thing, iconic behaviour π β¨
πΈ SEE ALSO πΈ
π AUTHOR π
David Goulet <dgoulet@ev0ke.net>
and that's the whole page, bestie!! this version is from August 24th, 2013, and yes the page name at the bottom of the original is TORSOCKS.CONF(5) β same as the top, because manpages love symmetry π«Ά go forth and configure responsibly. 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 bookworm: torsocks 2.4.0-1 Β· GPL-2.0-or-later
- debian trixie: torsocks 2.5.0-1+deb13u1 Β· GPL-2.0-or-later
- epel 10: torsocks 2.4.0-9.el10_1 Β· GPL-2.0-or-later
- epel 9: torsocks 2.4.0-1.el9 Β· GPLv2+
- fedora 43: torsocks 2.4.0-10.fc43 Β· GPL-2.0-or-later
- fedora 44: torsocks 2.4.0-10.fc43 Β· GPL-2.0-or-later
- nixos 26.05: torsocks 2.5.0
- nixpkgs unstable: torsocks 2.5.0
- ubuntu noble: torsocks 2.4.0-1 Β· GPL-2.0-or-later
- 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