FelisCatus / switchysharp

Automatically exported from code.google.com/p/switchysharp
GNU General Public License v3.0
140 stars 50 forks source link

似乎启用了用户未定义的规则 #957

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
不知是否启用了 chrome.webNavigation 
API来自动代理,我所写规则未涉及到的网址,也被代理了起��
�。

请作者解释下,我好做下一步翻墙优化。

Original issue reported on code.google.com by igonej...@gmail.com on 29 May 2014 at 5:29

Attachments:

GoogleCodeExporter commented 9 years ago
Issue 958 has been merged into this issue.

Original comment by shyc2...@gmail.com on 30 May 2014 at 1:21

GoogleCodeExporter commented 9 years ago
不记得有做过那种事情。首先请检查当前模式确实是自动切��
�模式,然后按一下导出PAC文件,把结果上传到这里。

Original comment by shyc2...@gmail.com on 30 May 2014 at 1:24

GoogleCodeExporter commented 9 years ago
结果如下

function regExpMatch(url, pattern) {    try { return new 
RegExp(pattern).test(url); } catch(ex) { return false; }    }
    function FindProxyForURL(url, host) {
    if (shExpMatch(url, "*twitter.com/*")) return 'PROXY 127.0.0.1:8087';
    if (shExpMatch(url, "*t.co*")) return 'PROXY 127.0.0.1:8087';
    if (shExpMatch(url, "*facebook.com/*")) return 'PROXY 127.0.0.1:8087';
    if (shExpMatch(url, "*github*")) return 'PROXY 127.0.0.1:8087';
    if (shExpMatch(url, "*.tumblr.com*") || shExpMatch(url, "*://tumblr.com*")) return 'PROXY 127.0.0.1:8087';
    if (shExpMatch(url, "*upload.wikimedia.org/*")) return 'PROXY 127.0.0.1:8087';
    return 'DIRECT';
}

tumblr怎么有两个生成规则

Original comment by igonej...@gmail.com on 30 May 2014 at 3:55

GoogleCodeExporter commented 9 years ago
确实是使用了自动代理,我用swtichy好久了……从 goagent 
开始开发到 plus 作者接手再到sharp 接手 plus……

Original comment by igonej...@gmail.com on 30 May 2014 at 4:05

GoogleCodeExporter commented 9 years ago
可能是那个地址里碰巧有 t.co 
字样或者什么的吧……可以试着改成 *://t.co/* 
也许误伤会少一点。

Original comment by shyc2...@gmail.com on 30 May 2014 at 4:09

GoogleCodeExporter commented 9 years ago
啊……真是这样啊,我改改。

话说 swithcy 的 regexp 
真的不是很好用,我觉得最有需要的是简单的域名匹配,而��
�是连协议都包括在内的整条网址……

谢谢作者。

Original comment by igonej...@gmail.com on 30 May 2014 at 4:16

GoogleCodeExporter commented 9 years ago
2.0 已经在做域名规则了,大概是 *.example.com 
这样用的。不过暂时……还没做好。

Original comment by shyc2...@gmail.com on 30 May 2014 at 4:20

GoogleCodeExporter commented 9 years ago
棒!

Original comment by igonej...@gmail.com on 30 May 2014 at 4:22