我的pac文件

Update:这个文件有bug,看这个生成脚本

中午吃饭的时候另外一只手可以用键盘爽快的使用Google Reader,谢谢这个好工具。可是李笑来的博客不能访问了,很不爽。所以只得打开pac文件加上这个网站,随后一想,应该共享我的pac文件,大家也可以相互分享出来。我是根据Livid同学的这篇博客改巴改巴出来的。

function FindProxyForURL(url, host) {
  //Change it to your proxy
  var socks_proxy = "SOCKS 127.0.0.1:7777";
  
  //Add your favorite gfwed sites into this list
  var gfwed_sites = [
    "wikipedia.org",
    "apple.com",
    "tumblr.com",
    "soup.io",
    "pandora.com",
    "last.fm",
    "adobe.com",
    "photoshop.com",
    "google.com",
    "googlecode.com",
    "blogspot.com",
    "appspot.com",
    "acer.com",
    "demonoid.com",
    "alexa.com",
    "wikimedia.org",
    "flickr.com",
    "yahoo.com",
    "zend.com",
    "aptana.com",
    "uncyclopedia.tw",
    "uncyc.org",
    "youtube.com",
    "ytimg.com",
    "webarchive.org",
    "pornhub.com",
    "youporn.com",
    "twitter.com",
    "facebook.com",
    "wikipedia.org",
    "mail-archive.com",
    "versionsapp.com",
    "xiaolai.net"
  ];

  for(var index = 0; index < gfwed_sites.length; index++) {
    if(shExpMatch(url, "*." + gfwed_sites[index] + "/*")){
      return socks_proxy;
    }
    if(shExpMatch(url, gfwed_sites[index] + "/*")){
      return socks_proxy;
    }
  }

  return "DIRECT";
}


应该也可以从这里下载:tin.pac

参考:

  1. Livid's Paranoid - PAC & SSH
  2. Auto-configuring Proxy Settings with a PAC File

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.