在linux用firefox,又不像windows下的chrome那樣,可以直接設置個自動代理,但是發現firefox有個自動代理的功能哦。

/home/allen/Documents/google.pac的內容如下:
"use strict";
/*
* Generated from https://github.com/NewFuture/pac
* see all pac files https://pac.newfuture.cc
*/
function FindProxyForURL(url,host){
if(dnsDomainIs(host, ".google.com")){
return "PROXY 192.11.22.17:1080";
}
if(dnsDomainIs(host, "ip.3322.org")){
return "PROXY 192.11.22.17:1080";
}
}
如果要添加被代理訪問的網站就是添加一個
if(dnsDomainIs(host, "你想被代理的網站")){
return "PROXY 代理服務器的IP:代理服務器端口";
}
剩下的應該都懂了吧?
