Proxify applications with torsocks

Many applications do not directly support the use of socks proxy. Torsocks enables such applications to use the tor socks proxy.

Shell wrapper to simplify the use of the torsocks library to transparently allow an application to use a SOCKS proxy.

Torsocks gets installed along with the tor package on ubuntu for example

$ sudo apt-get install tor

Proxify applications

Lets say we want to proxify the telnet command to connect through a proxy. This can be done by wrapping the telnet command with torify/usewithtor.

$ torify telnet google.com 80

or

$ usewithtor telnet google.com 80

Now all network calls made by the telnet programs shall be routed through the tor proxy. To see the proxy effect try opening the the url www.ipmango.com/api/myip through curl. The url echos the public ip of the requesting user.

Without proxy it would look something like this

$ curl www.ipmango.com/api/myip
14.99.151.147
$

Now using it with torsocks.

$ usewithtor curl www.ipmango.com/api/myip
93.114.43.156
$

Now the ip is changed because the url was opened through the tor proxy.

Check the project homepage to find out what applications work well with torsocks. For example pidgin works with torsocks. Just launch it with the usewithtor command

$ usewithtor pidgin






Last Updated On : 25th March 2013

Subscribe to get updates delivered to your inbox

1 Comment + Add Comment

  • Thanks for this. It helps a lot for routing separate processes to the Tor network without going through SOCKS proxy configuration and socat.

Leave a comment