output
pac template for white list
需要代理的域名或IP写入白名单数组即可
input
google pac
https://zh.wikipedia.org/zh-hans/%E4%BB%A3%E7%90%86%E8%87%AA%E5%8A%A8%E9%85%8D%E7%BD%AE
algo
var gfwdomains=new Array( //to define the domain to use proxy
"google.com"
);
var proxy="SOCKS5 127.0.0.1:1080"; //to define proxy's protocal and domain(or IP)
function FindProxyForURL(url, host) {
for(var i=0;i<gfwdomains.length;i++){
if(shExpMatch(url,"*"+gfwdomains[i]+"*")){return proxy;}
}
return "DIRECT";
}
原创,有需要的朋友请使用
本文介绍了一种通过PAC文件实现自动代理配置的方法。具体包括如何定义需要代理的域名白名单及设置代理服务器参数等内容。此外,还提供了一个示例脚本,用于演示如何根据指定的URL和主机名确定是否使用代理。
1万+

被折叠的 条评论
为什么被折叠?



