vincentwilliam / ipv6-hosts

Automatically exported from code.google.com/p/ipv6-hosts
0 stars 0 forks source link

请问怎样在pac中用IPV6的地址 #73

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
pac 
中需要填写地址和端口,但是hosts中那么多,怎么做,比如fac
ebook想用pac的话

Original issue reported on code.google.com by Michael1991dpc on 15 Sep 2011 at 3:45

GoogleCodeExporter commented 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

GoogleCodeExporter commented 8 years ago
关键是hosts里面对应的都是不同端口。。。难道是要用网上的
ipv6 代理吗,那样速度就太水了

Original comment by Michael1991dpc on 16 Sep 2011 at 4:19

GoogleCodeExporter commented 8 years ago
hosts 里只有 ip 呀 冒号相当于 IPv4 的点号
hosts 语法中不允许通配符 枚举又很难列全 
只能正则匹配进行代理或者搭建 DNS 解决

Original comment by xslidian on 16 Sep 2011 at 4:24

GoogleCodeExporter commented 8 years ago
哦。。明白了,感谢~!

Original comment by Michael1991dpc on 16 Sep 2011 at 8:45

GoogleCodeExporter commented 8 years ago
但是ip也很多啊。。。要一个个填么~~

Original comment by Michael1991dpc on 16 Sep 2011 at 8:55