Quick encrypt for your coffee shop traffic.
Just a little function to add to your .profile that automatically turns on a socks proxy and tunnels all your traffic through the server of your choice. It’s a simple setup and <CTRL>-C kills the connection and shuts off the proxy. This assumes that you have shell access to some server that you trust to run your traffic through.
I recommend setting up public key authentication for ease of use.
# warm feet
function socks() {
networksetup -setsocksfirewallproxy AirPort localhost 9999
ssh -ND 9999 -C username@domain
networksetup -setsocksfirewallproxystate AirPort off
}
(One caveat: If you happen to close the window of your terminal without hitting <CTRL>-C first, it will not disable the socks proxy.)
August 16th, 2011 at 10:41 am
Nice script.
You should have a look at Sidestep http://chetansurpur.com/projects/sidestep/. It enables socks transparently when the wifi is not encrypted.
August 17th, 2011 at 12:58 pm
Nice! I might recommend that to a few friends.