Skip to content

Instantly share code, notes, and snippets.

@tony1223
Created April 4, 2011 14:19
Show Gist options
  • Save tony1223/901710 to your computer and use it in GitHub Desktop.
Save tony1223/901710 to your computer and use it in GitHub Desktop.
function FindProxyForURL(url, host)
{
if (shExpMatch(url, "http://www.facebook.com*")) {
return "SOCKS5 localhost:1079";
}
if (shExpMatch(url, "*fbcdn*")) {
return "SOCKS5 localhost:1079";
}
if (shExpMatch(url, "*youtube*")) {
return "SOCKS5 localhost:1079";
}
if (shExpMatch(url, "*mail.google.com*")) {
return "SOCKS5 localhost:1079";
}
if (shExpMatch(url, "*edu.tw*")) {
return "SOCKS5 localhost:1079";
}
if (shExpMatch(url, "*csie.net*")) {
return "SOCKS5 localhost:1079";
}
if (shExpMatch(url, "*twitter*")) {
return "SOCKS5 localhost:1079";
}
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment