hui
12/28/2009 - 1:36 PM

proxy.pac

function FindProxyForURL(url, host)
{
  var domain_list = [
  "wikipedia.org",
  "wordpress.com",
  //"flickr.com",
  "blogspot.com",
  "groups.google.com",
  "feedburner.com",
  "v2ex.com",
  ".vox.com",
  ".railsengines.org",
  ".rails-engines.org",
  "technorati.com",
  "fullbleed.org",
  "coversutra.com",
  "yam.com",
  "funp.com",
  "wretch.cc",
  "mitbbs.com",
  "blogs.com",
  "soup.io",
  "tw.rd.yahoo.com",
  "tw.download.yahoo.com",
  "technorati.com",
  "sproutcore.com",
  "wiki.sproutcore.com",
  "pbworks.com",
  ".pbworks.com",
  "vimeo.com",
  ".vimeo.com",
  "twitter.com",
  "bit.ly",
  "ts.vimeo.com.s3.amazonaws.com"
  ];
  for (var i = domain_list.length - 1; i >= 0; i--){
    if (dnsDomainIs(host,domain_list[i])) {return "PROXY 127.0.0.1:8118"}
  };
  return "DIRECT"
}