My grad school lets me access ACM publications whenever I access them from an internal lab computer. When I’m home and I want to read something though, I had two options so far: hope that they had copies on public home pages and search via Google Scholar, or get the link and use wget to fetch the PDF’s over an SSH terminal and then SCP it across. Both were no fun, and the solution turned out to be simpler than I thought.

The easiest approach I could think of is to tunnel HTTP requests over SSH so that the other party (ACM etc.) sees the requests as coming from a lab computer and gives me access. On PuTTY this was pretty straightforward: we just need to add a forwarded port from a local port (I picked 3129) with a blank destination and “dynamic” for the connection type.

Configuring PuTTY to proxy web traffic

The only gotcha I noted in configuring Firefox was that I had to give (localhost, 3129) as the SOCKS host, and not the HTTP proxy, and had to ensure that the SOCKS version was 5 (default choice).

Proxy configuration in Firefox

Speaking of tunnels, I also used Stunnel recently for a project and found it to be quite nice as well – giving some features PuTTY doesn’t give like logging the individual connections. Firefox remembers the last proxy settings, so enabling and disabling the proxy is not difficult. For those not so fortunate, there are numerous proxy manager plugins for Firefox like SwitchProxy and FoxyProxy. Can’t vouch for either, but I think I used SwitchProxy some time back and thought it was neat.

I found this article to be very helpful in figuring things out. Another article shows a slightly more complicated approach with proxy auto configuration scripts and using Netscape Navigator’s profiles for managing proxies.

Advertisements