Wiki > tsocks
tsocks is a program used for introducing support for SOCKS tunnels in programs that otherwise don't support it. It's useful in conjunction with SSH Tunneling.
Tsocks is a program that you'll run on your local machine, and first needs to be installed.
Mac OS X
The easiest way to install tsocks on a Mac is to use the Homebrew package manager. Homebrew can be installed using instructions on that page. Tsocks can then be installed using the following commands:
brew tap adamv/alt brew install tsocks
tsocks can be installed from you distro's package manager of choice.
Depending on your operating system and package manager, the tsocks configuration will be installed in:
/etc/tsocks.conf. Update it to include the following:
local = 192.168.0.0/255.255.255.0 server = 127.0.0.1 server_type = 5 server_port = 8080
This assumes you use 8080 as your tunneling port.
Mac OS X
The only way to invoke a tsocks program is to open it from Terminal instead of using the Finder or Launch Pad. An example use is
tsocks /Applications/Textual.app/Contents/MacOS/Textual to launch the textual IRC client using your SSH tunnel, when it otherwise wouldn't support that functionality.
Simply launch your programs with
tsocks prefixing them on the command line or in the launcher definition. Example:
tsocks wget http://google.com/ would fetch the google home page through the socket.