firefox PAC代理

在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:代理服务器端口";
}

剩下的应该都懂了吧?

猜你喜欢

转载自www.cnblogs.com/5haoanqu/p/11097703.html
PAC