Facebook at work using SSH and a .pac file

miller's picture

I was able to finally get a proxy going at work to get around the facebook block. Took me a bit of trial and error, but I was able to get this working without an actual proxy server installed anywhere! Just a bit of SSH (with shell access to a remote linux box) and a crafty .pac file and you're on your way...

SSH:
$ ssh -D 9999 [user]@[remote server]

proxy.pac file:
function FindProxyForURL(url, host)
{
if(shExpMatch(host, "*facebook.*") || shExpMatch(host, "*fbcdn.*"))
{
return "SOCKS localhost:9999";
}
else
return "DIRECT";
}

Firefox: Edit > Preferences > Advanced > Network (tab) > Setting > Automatic proxy configuration URL: [path to proxy.pac]