Wednesday, July 01, 2009

Using the Secure-Tunnel bookmarklet to secure your Web connection

I've been using Secure-Tunnel to securely tunnel Web traffic when connecting to the Internet from less than trustworthy locations.  Using the FoxyProxy add-on to Firefox, it's fairly easy to set up a tunneled profile based on URL patterns:

FoxyProxy

but what if you don't want or have the luxury of installing FoxyProxy on the computer you're using?  Wouldn't it be cool to have a lightweight bookmarklet to get approximately the same functionality.

I decided to see if I could try my hand at hacking a JavaScript silly string to do just that.  Breaking down the URL generated by the value-add service called ST Securebar by Secure-Tunnel, I was able to create the following hacked bookmark:

javascript:%20var%20u%20=%20'http/'%20+%20window.location.host%20+window.location.pathname;%20u%20=%20'https://securebar.secure-tunnel.com/cgi-bin/nph-securebar.cgi/010100A/'%20+%20escape(u);%20window.location%20=%20u;

Yeah, ugly, right?  For convenience, I've created a small bookmarklet below:


Just drag the link up into your Bookmarks Toolbar and you'll be able to tunnel your currently displayed Web page within an SSH Secure-Tunnel.

Comments and questions welcome.