Downloading Torrents inside LAN, behind proxy.

Posted by Shashank Krishna Tuesday, January 6, 2009


Ok guys, I am back with my daily ‘durty’ trick. Today we are going to download torrents inside a LAN where access to outside world is only through an HTTP proxy (most common scenario).

My next post is going to be about how to optimize your torrents downloads. So this post seemed logical as we moved form SSH to torrents. In our previous posts, we created a normal forward tunnel and a reverse tunnel and used them to unblock websites and to create a listening port inside LAN. This post revolves around dynamic tunnel. (A socks PROXY)

Trivia : Did you know Opera has an in-built torrent client.

Torrents is my preferred means of downloads. Torrents are a best helpful means for small websites to distribute big files. Everyone knows bandwidth costs money. Many open source Distros primarily rely upon torrents to be distributed. I believe its a perfect “Give and Take” model and is the future of distribution. Anyone can setup a tracker service and manage torrent distribution (unlike Gnutella and eDonkey).

Again, our aim is not to actually somehow download torrents at our workplaces. This would be illegal at most places. All we are discussing here is again power of SSH. Everything said/done here is for knowledge purpose.

OK. Lets download some torrents. Again, this post assumes that you have already set up your infrastructure from my previous post. This means, your are listening well on port 443. Please remember that this is our port of choice as we are doing all communication over HTTP proxy. Its a simple TIT for TAT solution. ;)

OK, this one is pretty simple. All you have to do is, add one more tunnel to your existing session putty session. Create this tunnel as follows:

Source port: 23456 (Any, Your favorite number?)

Type = Dynamic. ( Note that last two times we created Local and Remote tunnels )

Putty config

Save session and open connection. We have just created a dynamic Socks proxy at port 23456.

Now open your preferred torrent client. I normally use

  • Azureus(Anywhere with lot of RAM,Overall best)
  • Deluge(Gnome, CPU issues)
  • Ktorrent(KDE)
  • uTorrent (Anywhere, Best client for less RAM).

Now open your client options and browse to connections settings and specify a socks proxy to be used. Make sure, you specify to use socks proxy even for peer 2 peer communication if such setting is there.

Done!! :) Grab the torrent file and load it in. Give that grim smile 8) and enjoy.

Important for half download speeds: Make sure that you keep torrent upload rate as low as possible while doing this, because whatever is being downloaded at home is finally being uploaded to your office connection. For e.g. if your bandwidth is 256kbps upstream. And you are uploading torrents at 15KBps, you can only download torrents at 15KBps at office. Simple maths. Also keeping very low upload speeds would also deteriorate download speeds. So for e.g., keep upload speed at 5KBps, and you will easily get 25KBps for download at office on a 256kpbs bandwidth.

You are all welcome to posts your comments/questions on SSH series of post (3 of them). Also let me know any future topics of discussions.


Spread Firefox Affiliate Button | edit post .

1 Comment



Post a Comment

Are You Planning on Quitting Facebook? Why?


About Me

My Photo
Shashank Krishna
Bangalore, up, India
nothin much to say.........doin in IIIT allahabad loves bloggingn hacking.... :) and loooves blogging
View my complete profile