玉藻前 大佬有话说 : 2020-1-3 11:19:40
问个酸酸ru的PAC怎么写
就比如
*.google.com
*.pixiv.com
所有IP直接访问(写0.0.0.0/0?)
都走代理,其他全部直连,这种应该怎么写?
hehe 大佬有话说 : 2020-1-3 11:27:18
玉藻前 大佬有话说 : 2020-1-3 11:24
这是Adblock规则吧,我想用于SSR本地的PAC文件
写法好像差不多,我之前google到的代理是指定走IP端口 …
写法差不多?你胡扯吧
你看酸酸官方文档,pac 用的就是 Adblock Plus 规则
hehe 大佬有话说 : 2020-1-3 11:21:21
https://adblockplus.org/en/filter-cheatsheet
hehe 大佬有话说 : 2020-1-3 11:23:54
hehe 大佬有话说 : 2020-1-3 11:21
https://adblockplus.org/en/filter-cheatsheet
||google.com
||youtube.com
||pornhub.com
@@||baidu.com
@@||taobao.com
玉藻前 大佬有话说 : 2020-1-3 11:24:56
hehe 大佬有话说 : 2020-1-3 11:21
https://adblockplus.org/en/filter-cheatsheet
这是Adblock规则吧,我想用于SSR本地的PAC文件:'(
写法好像差不多,我之前google到的代理是指定走IP端口的,不知道切换了节点得怎么写
羊毛党 大佬有话说 : 2020-1-3 11:25:22
还在用这东西……太落后吧
玉藻前 大佬有话说 : 2020-1-3 11:28:39
hehe 大佬有话说 : 2020-1-3 11:27
写法差不多?你胡扯吧
你看酸酸官方文档,pac 用的就是 Adblock Plus 规则
没看过酸酸官方文档,看的都是别人的博客:Q
我去看看
玉藻前 大佬有话说 : 2020-1-3 11:39:30
hehe 大佬有话说 : 2020-1-3 11:23
var rules = [
"*.google.com/*"
"||youtube.com/*",
"||pornhub.com/*",
];
dalao,||这个符号算通配符吗?比如可能是http,也可能有https走google的二级域名,直接写
"||.google.com/*"
可以吗?
还有直接访问IP也代理得怎么写啊
hehe 大佬有话说 : 2020-1-3 11:44:15
玉藻前 大佬有话说 : 2020-1-3 11:39
dalao,||这个符号算通配符吗?比如可能是http,也可能有https走google的二级域名,直接写
可以吗 …
看我在2楼的回帖
BOC 大佬有话说 : 2020-1-3 11:48:50
本帖最后由 BOC 于 2020-1-3 12:21 编辑
google.com 表示 拦截google.com结尾的
my.abc.com 表示 拦截URL my.abc.com 结尾的
加入到这个里面的 都是走代理的
var domains = {
"google.com":1,
"t66y.com":1,
"my.abc.com":1
};
var proxy = "__PROXY__";
var direct = ‘DIRECT;’;
var hasOwnProperty = Object.hasOwnProperty;
function FindProxyForURL(url, host) {
var suffix;
var pos = host.lastIndexOf(‘.’);
pos = host.lastIndexOf(‘.’, pos – 1);
while(1) {
if (pos <= 0) {
if (hasOwnProperty.call(domains, host)) {
return proxy;
} else {
return direct;
}
}
suffix = host.substring(pos + 1);
if (hasOwnProperty.call(domains, suffix)) {
return proxy;
}
pos = host.lastIndexOf(‘.’, pos – 1);
}
};