Stealing someone's free WiFi and don't want your traffic snooped? Here's a very simple way to setup a SOCKS proxy on any port above 1024 that isn't currently in use. (Below is usually reserved for root and you'll receive a message like this: Privileged ports can only be forwarded by root.).
Syntax:
ssh -d <PORT> <;
Example:
ssh -D 9998
What this does:
This will open up localhost:9998 on your machine which you can then set your browsers, etc to use as a SOCKS proxy. Both SOCKS4 and SOCKS5 protocols are supported. ssh acts as the SOCKS server. You need to leave the ssh connection open during the full time you wish to use the proxy. As soon as you close the terminal window it's gone.
Macs:
If you're on a mac you set the proxy here: System Preferences >> Network >> Advanced button >> Proxies
Here's a picture for the visual learners: