How many times have you found applications not having proper proxy support. Or sometimes, they support proxies but does not let you provide proxy authentication. Ever used plain old telnet through a proxy ? Ever ran port scanners through proxies ? 😉
Ever found wanting on how to use multiple cascading proxies, like two or more proxy in series.
Uses for cascading proxies? – TOR networks, OR Sometimes only way to get out of a LAN is to travel through more than two proxies – from one network to other network to internet. For e.g. you are in a secure network inside some outside networks.
Or how about mixing many proxies in the chain, Socks->HTTP->Socks etc,
I think you got the point.
TSOCKS – A simple “Transparent SOCKS”.
Here’s a cool tool “Tsocks” or transparent- socks, which lets you run any program through a socks proxy. All you have to do is specify the proxy server in config file and run the program as,
> tsocks programName
Tsocks forces program to create all its connections through the address specified in configuration file. This way, you can force any program to connect over a socks proxy.
This can find a lot of uses such as, if you want to sniff only a particular application’s traffic, or may be you want to use cascading proxies. I use it to create a socks proxy over SSH and simply run my googleTalk through it.
So why waiting, grab a terminal – sudo apt-get install tsocks
To edit config file, gedit /etc/tsocks.conf
– Specify local networks @ “local = ” e.g. in my case local = 192.168.1.0/255.255.255.0
– Now browse towards the end and specify socks server address and port. Keep server type as 5. That’s SOCKS 5
Windows alternative : FreeCap
2. Proxychain – Daddy of all proxies
Basic use is same as Tsocks, except that as name suggests used for proxy chains. You can even mix different proxies(Socks 4,5, http,https).
Regarding the config file (/etc/proxychain.conf) : It can work in one of three modes:
– strict_chain – All proxies in the chain are used in order.
– dynamic_chain – All proxies in the chain are used in order. Dead proxies are skipped.
– random_chain – Random proxy or proxy-chains are used.
chain_len : length of chains to be used by random_chain
After this simply write proxies in series as shown in the config file.
Again usage is very simple. > proxychains telnet targethost.com
Windows Alternative : Sockschain
It should be interesting to find out how proxychain actually works. So much there, and so less time. Damn! weekend is about to get over. Off to watch, “Hairspray”. 🙂





November 18, 2007 at 7:32 pm
[…] You can read the rest of this blog post by going to the original source, here […]
November 25, 2007 at 5:25 pm
[…] That’s it. You are done. Restart client service and you have a ready to go SOCKS proxy over which you can tunnel as many protocols as you want. Again for application not supporting SOCKS proxy like IE, Opera use proxifiers as suggested in my previous post here. […]
February 1, 2008 at 12:56 am
Excellent guide! I often use proxychain but did not know about tsocks.
March 19, 2008 at 6:22 am
I can’t seem to get proxychains to authenticate correctly – even in the case of a single proxy. My configuration line looks like this:
strict_chain
http 3128 \
If I set http_proxy to “http://\:@:3128” then I can at least do something like “wget yahoo.com” but if I clear http_proxy and instead try “proxychains wget yahoo.com” then I get:
–18:05:28– http://yahoo.com/
=> `index.html’
Resolving yahoo.com… 66.94.234.13, 216.109.112.135
Connecting to yahoo.com|66.94.234.13|:80… ProxyChains-2.1 (http://proxychains.sf.net)
strict chain:..broken
failed: Connection refused.
So I presume proxychains isn’t authenticating correctly with my local proxy, possibly because of having the domain specified. I’ve tried putting quotes around the “\” and I’ve tried putting double-backslash in the place of single-backslash. No change.
Any ideas?
March 19, 2008 at 6:25 am
Let me try that again… all the bits that look like HTML got swallowed by WordPress…
I can’t seem to get proxychains to authenticate correctly – even in the case of a single proxy. My configuration line looks like this:
strict_chain
http (URL) 3128 (domain)\(user) (pass)
If I set http_proxy to “http://(domain)\(user):(pass)@(URL):3128” then I can at least do something like “wget yahoo.com” but if I clear http_proxy and instead try “proxychains wget yahoo.com” then I get:
–18:05:28– http://yahoo.com/
=> `index.html’
Resolving yahoo.com… 66.94.234.13, 216.109.112.135
Connecting to yahoo.com|66.94.234.13|:80… ProxyChains-2.1 (http://proxychains.sf.net)
strict chain:..broken
failed: Connection refused.
So I presume proxychains isn’t authenticating correctly with my local proxy, possibly because of having the domain specified. I’ve tried putting quotes around the “(domain)\(user)” and I’ve tried putting double-backslash in the place of single-backslash. No change.
Any ideas?
March 29, 2008 at 9:52 pm
Try doing the same w/o using strict chain: use dynamic
I don’t know why but it worked for me.
You must use IP adresses (no DNS) when you put proxies in the config file.
December 6, 2009 at 5:27 pm
very handy tsocks guide .. thank you
January 23, 2010 at 3:23 am
[…] Proxify any application. Tsocks and proxychains. Force any program …(英文版) […]
March 18, 2010 at 10:03 am
it pisses me off becase proxychains is a piece of shit and so is tsocks .. they both dont fucking work correctly and yes I have entered in working proxy servers. fuck.
October 15, 2010 at 3:30 pm
[…] Proxify any application. Tsocks and proxychains. Force any program …(英文版) 以下说明都是为了那些使用 Ubuntu 的 Linux 用户,不过在别的 Linux 发行版下,安装的过程应该与此差不多。 […]
January 30, 2011 at 1:48 pm
FreeCap does not work on Win7.
March 29, 2011 at 9:36 pm
hi i have samsung corby gt-s3650 and i have a free 0.facebook.com ,so i download a bolt handler ,but this application keep givin me this message ” internet not available check network sevices ” but iam using a opera handler and it’s woking good ,so what i need is a proxy able to make this appliction work !!!and tnk u!
August 15, 2012 at 8:52 am
is there something similar to tsocks that uses an http proxy instead of a socks proxy ?
so that tool can force any program to use an http proxy ?
May 16, 2015 at 9:33 am
There is also Torify
February 24, 2016 at 8:59 am
[…] That’s it. You are done. Restart client service and you have a ready to go SOCKS proxy over which you can tunnel as many protocols as you want. Again for application not supporting SOCKS proxy like IE, Opera use proxifiers as suggested in my previous post here. […]