我的系统是 Lion 在network里配了自动代理
pac文件如下:
var PROXY = {
DIRECT: "DIRECT",
LOCAL: "SOCKS5 127.0.0.1:1986;SOCKS 127.0.0.1:1986"
};
function FindProxyForURL(url, host) {
if (isMatchUrl(url)) {
return PROXY.LOCAL;
}
return PROXY.DIRECT;
}
function isMatchUrl(url) {
if (false
|| strMatchAll(url, "twitgoo.com")
|| strMatchAll(url, "dropbox.com")
|| strMatchAll(url, "twitpic.com")
|| strMatchAll(url, "iphonesdkarticles.com")
|| strMatchAll(url, "img.ly")
|| strMatchAll(url, "wikipedia.org")
|| strMatchAll(url, "bullogger.com")
|| strMatchAll(url, "ytimg.com")
|| strMatchAll(url, "twitter.com")
|| strMatchAll(url, "mail-archive.com")
|| strMatchAll(url, "wordpress.com")
|| strMatchAll(url, "blogspot.com")
|| strMatchAll(url, "mobypicture.com")
|| strMatchAll(url, "mypopescu.com")
|| strMatchAll(url, "front.ru")
|| strMatchAll(url, "spaces.live.com")
|| strMatchAll(url, "poptop.org")
|| strMatchAll(url, "zeebob.com")
|| strMatchAll(url, "kwiboo.com")
|| strMatchAll(url, "google.com")
|| strMatchAll(url, "feedburner.com")
|| strMatchAll(url, "freebyte.us")
|| strMatchAll(url, "ml.tc")
|| strMatchAll(url, "1apple.info")
|| strMatchAll(url, "yfrog.com")
|| strMatchAll(url, "blogger.com")
|| strMatchAll(url, "facebook.com")
|| strMatchAll(url, "fbcdn.net")
|| strMatchAll(url, "youtube.com")
|| strMatchAll(url, "foursquare.com")
|| strMatchAll(url, "webcache.googleusercontent.com")
|| strMatchAll(url, "gmail.com")
|| strMatchAll(url, "t.co")
|| strMatchAll(url, "couchbase.com")
// place holder
) {
return true;
}
return false;
}
/**
* 贪婪匹配对应的字符串
*/
function strMatchAll(url, match) {
return shExpMatch(url.toLowerCase(), "*" + match.toLowerCase() + "*");
}
里边没有配 segmentfault.com 的域名,但是访问的时候很慢,查了一下是走了这个代理,其他网站正常,比如weibo.com 就正常。求解