在linux用firefox,又不像windows下的chrome那樣,能夠直接設置個自動代理,可是發現firefox有個自動代理的功能哦。linux
/home/allen/Documents/google.pac
的內容以下:git
"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"; } }
若是要添加被代理訪問的網站就是添加一個github
if(dnsDomainIs(host, "你想被代理的網站")){ return "PROXY 代理服務器的IP:代理服務器端口"; }
剩下的應該都懂了吧?chrome