<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dare to Dream? &#187; Hacks</title>
	<atom:link href="http://www.makuchaku.in/blog/category/hacks/feed" rel="self" type="application/rss+xml" />
	<link>http://www.makuchaku.in/blog</link>
	<description>Good judgment comes from experience; Experience comes from bad judgment.</description>
	<lastBuildDate>Sun, 02 Oct 2011 19:29:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Pull up your socks &#8211; The magic of tsocks&#8230;</title>
		<link>http://www.makuchaku.in/blog/pull-up-your-socks-the-magic-of-tsocks</link>
		<comments>http://www.makuchaku.in/blog/pull-up-your-socks-the-magic-of-tsocks#comments</comments>
		<pubDate>Fri, 30 Oct 2009 04:42:47 +0000</pubDate>
		<dc:creator>Mayank Jain (makuchaku)</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[How-To]]></category>

		<guid isPermaLink="false">http://www.makuchaku.in/blog/?p=807</guid>
		<description><![CDATA[So if you are in a same situation as mine, you probably&#8230; Are on an MNC&#8217;s intranet which is being simultaneously used by a ton of other souls Get pathetic internet speeds, at times &#8211; measurable sometimes in BYTES! Even &#8220;git pull&#8221; takes like ages to complete&#8230; Any connection to Twitter is severed before it [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[ 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/pull-up-your-socks-the-magic-of-tsocks&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span><p>So if you are in a same situation as mine, you probably&#8230;</p>
<ul>
<li>Are on an MNC&#8217;s intranet which is being simultaneously used by a ton of other souls</li>
<li>Get pathetic internet speeds, at times &#8211; measurable sometimes in BYTES!</li>
<li>Even &#8220;git pull&#8221; takes like ages to complete&#8230;</li>
<li>Any connection to Twitter is severed before it even sees light of the day!</li>
</ul>
<p>The solution to all these worries is simpler than you think.</p>
<p>We can create an SSH tunnel to a *much* faster server and push our internet traffic over it. If the server is local, this will work even better &#8211; as your SSH on local LAN connections would be definitely faster than that on real WWW.</p>
<p>Follow <a href="http://wiki.freaks-unidos.net/weblogs/azul/firefox-ssh-tunnel" target="_blank">http://wiki.freaks-unidos.net/weblogs/azul/firefox-ssh-tunnel</a> and create a tunnel on any port. Lets call it $PORT<br />
Basically, you need to run&#8230;</p>
<pre>ssh -fND localhost:$PORT username@some-fast-server.com</pre>
<p>Install <a href="http://tsocks.sourceforge.net/" target="_blank">tsocks</a> &#8211; its a Transparent SOCKS Proxying Library which uses the magic of LD_PRELOAD and patches the connect() call to appropriately use a pre-configured proxy (via /etc/tsocks.conf). Hence any call like&#8230;</p>
<blockquote><p>git pull</p></blockquote>
<p>becomes</p>
<blockquote><p>tsocks git pull</p></blockquote>
<p>Your /etc/tsocks.conf looks something like this (after removing all the comments)</p>
<blockquote><p>#Define a local network for which tsocks won&#8217;t patch the connect() call<br />
local = 192.168.0.0/255.255.0.0</p>
<p>path {<br />
reaches = 0.0.0.0/0.0.0.0<br />
server = 127.0.0.1<br />
server_type = 5<br />
server_port = $PORT<br />
}<br />
server = 127.0.0.1<br />
server_type = 5<br />
server_port = $PORT</p></blockquote>
<p>Replace the $PORT by the port you selected when creating the SSH tunnel. Server remains 127.0.0.1 as your tunnel exists on your own machine.</p>
<p>To configure your Firefox to use this new tunnel, goto Edit &gt; Preferences &gt; Advanced &gt; Network Tab &gt; Settings and make it look like</p>
<p><img title="Connection Settings" src="http://www.makuchaku.in/blog/wp-content/uploads/2009/10/Screenshot-Connection-Settings.png" alt="Connection Settings" width="518" height="559" /><br />
Add URL&#8217;s and IP ranges to &#8220;No Proxy for&#8221; field to exempt them from using the SSH tunnel.</p>
<p>That&#8217;s it. Click OK and you are ready to rock!</p>
 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/pull-up-your-socks-the-magic-of-tsocks&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.makuchaku.in/blog/pull-up-your-socks-the-magic-of-tsocks/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

