Created
December 29, 2012 14:09
-
-
Save lnsoso/4407139 to your computer and use it in GitHub Desktop.
PAC file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function regExpMatch(url, pattern) { | |
try { return new RegExp(pattern).test(url); } catch(ex) { return false; } | |
} | |
function FindProxyForURL(url, host) { | |
if (shExpMatch(url, "*twitter.com*")) return 'SOCKS 127.0.0.1:6789'; | |
if (shExpMatch(url, "*facebook.com*")) return 'SOCKS 127.0.0.1:6789'; | |
if (shExpMatch(url, "*youtube.com*")) return 'SOCKS 127.0.0.1:6789'; | |
return 'DIRECT'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment