Most applications that require Internet access have at least some form of SOCKS compatibility to allow the usage of proxies, but not all of them do. That’s where tsocks comes in; it overrides certain internal functions of the programs you tell it to load and redirects them through its own versions, which are SOCKS-aware and hence can be used through ssh tunnels, etc. tsocks is dead simple to set up and install; Ubuntu users can just grab it from repositories, or get the raw source files here. Then create a file named /etc/tsocks.conf by running
and adding a line
; that’s it! If your SOCKS server runs on a non-standard port, or requires a username and password, add lines assigning to server_port, default_user, or default_pass respectively.
Using tsocks is easy; if you want to run a single command using tsocks, just add tsocks to the beginning, like
. To make all programs use tsocks until further notice, just run
with no arguments; it’ll create a shell within your shell. To exit back out and stop using tsocks, just type
to exit the subshell.
