在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