Closed GoogleCodeExporter closed 8 years ago
语法参考 http://code.google.com/p/ipv6-hosts/source/browse/pac.js
第一行的 yourhttpproxy:80 为 http 代理的主机名与端口
匹配通过正则表达式进行 如
if(/^[\w\-]+:\/+(?!\/)(?:[^\/]+\.)?ak\.facebook\.com/i.test(url)) return PROXY;
if(/^[\w\-]+:\/+(?!\/)(?:[^\/]+\.)?channel\.facebook\.com/i.test(url)) return
PROXY;
if(/^[\w\-]+:\/+(?!\/)(?:[^\/]+\.)?fbcdn\.net/i.test(url)) return PROXY;
if(/^[\w\-]+:\/+(?!\/)fbcdn-(.{6,7})-a\.akamaihd\.net/i.test(url)) return PROXY;
Original comment by xslidian
on 15 Sep 2011 at 3:55
关键是hosts里面对应的都是不同端口。。。难道是要用网上的
ipv6 代理吗,那样速度就太水了
Original comment by Michael1991dpc
on 16 Sep 2011 at 4:19
hosts 里只有 ip 呀 冒号相当于 IPv4 的点号
hosts 语法中不允许通配符 枚举又很难列全
只能正则匹配进行代理或者搭建 DNS 解决
Original comment by xslidian
on 16 Sep 2011 at 4:24
哦。。明白了,感谢~!
Original comment by Michael1991dpc
on 16 Sep 2011 at 8:45
但是ip也很多啊。。。要一个个填么~~
Original comment by Michael1991dpc
on 16 Sep 2011 at 8:55
Original issue reported on code.google.com by
Michael1991dpc
on 15 Sep 2011 at 3:45