跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 问个酸酸ru的PAC怎么写
未分類
14 2 月 2020

问个酸酸ru的PAC怎么写

玉藻前 大佬有话说 : 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

|​|​g​o​o​g​l​e​.​c​o​m​
​|​|​y​o​u​t​u​b​e​.​c​o​m​
​|​|​p​o​r​n​h​u​b​.​c​o​m​
​@​@​|​|​b​a​i​d​u​.​c​o​m​
​@​@​|​|​t​a​o​b​a​o​.​c​o​m

玉藻前 大佬有话说 : 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/*"
​"|​|​y​o​u​t​u​b​e​.​c​o​m​​/*",
​"|​|​p​o​r​n​h​u​b​.​c​o​m​​/*",
];

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);
    }
};

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具