Comments (11)
blocked 里添加 google.com 就相当于 *.google.com。
google.com 有的子域名是抽风(想到写 COW 就是因为这个),有的是彻底被墙,所以我只是把 plus.google.com 加入到内置的被墙列表里。
不支持正则和星号,在查询一个 host 是否是用户指定时只需要查 host 和域名是否出现在一个 map 中即可(相关代码在 sitestat.go
中)。如果支持正则表达式,我目前能想到的办法是 host 跟每个正则表达式去匹配。
COW 的目的是为了让翻墙自动化,理想的情况是不需要 direct/blocked 这两个文件。而且 COW 目前的工作方式下我觉得正则表达式和星号匹配不是特别必要。
direct/blocked (包括 stat) 大多数情况下只是作为优化访问速度而存在的。direct 是为了让浏览器直连某些网站;blocked 是为了让被墙网站直接用二级代理,避免检测被墙花费的时间。目前一个 host 直接访问失败后 2 分钟内会总是使用二级代理,遇到 10 次这种情况后就直接使用二级代理。(有一定概率会直连,避免误判被墙。)
现在我遇到的一些问题是 google search 有时会需要等很长时间才能打开,可能是重试机制里有些问题。
from cow.
我遇到的问题和你一样,如果google.com相当于*.google.com那问题就不出在匹配的这部分了
from cow.
你是把 google.com 加入到 blocked 里也遇到了这样的问题么?
from cow.
没错
from cow.
那应该就不是重试请求的代码有问题了。目前 log 文件里只有创建 shadowsocks 连接出错才记 log,刚修改代码让所有 parent proxy 连接出错都记 error log。
from cow.
ff427c3报Config error: no such option "httpUserPasswd"
from cow.
ff427c3 这个 commit 还没有 merge 你的代码。最新的 develop branch 不会报错。
from cow.
刚刚看的是自己的fork,pull到e3764de没有报错了,不过访问google也没有错误日志,只是慢。
from cow.
真想实现正则表达式的话,可以参考词法分析,就是把一砣正则编译成一个状态机来实现匹配。虽然这功能我是用不着啦。
from cow.
@glacjay 嗯,直接把所有的表达式用或操作合并起来,compile 一次也可以。但 sitestat.go
中的代码也需要改成用正则表达式匹配。
加入这个功能其实就变成鼓励人去关心这两个文件,跟你以前提的建议也不符合。
from cow.
@cyfdecyf 嗯,所以这个只是纯技术讨论。
from cow.
Related Issues (20)
- mac coredump HOT 2
- 使用HTTP二级代理,验证问题。 HOT 1
- cow 可以作为socks5代理吗? HOT 1
- 希望可以 把 golang.org/x/ 的库全部放到vendors中 HOT 1
- 可以利用朋友在美国的ip当二级代理吗,cow可以实现吗 HOT 1
- How do I config a dedicated proxy for accessing unblocked sites ?
- cow提供的HTTP代理可以支持UDP转发从而优化游戏主机的联网吗?
- mac下启动cow失败 HOT 5
- Support docker for mac
- 如何全局代理走外网,本地网络不走代理? HOT 1
- MAC OS 10.14.3 运行错误 HOT 1
- fatal error: concurrent map read and map write
- 使用一次cow之后,本地的非浏览器网络连接都会转到127.0.0.1:7777,必须打开cow才可以上网 HOT 1
- 你好我想问一下COW是否可以用在OPENVPN上呢?
- 有计划增加trojan的二级代理支持吗
- 你好,请问支持指定出口IP吗
- 如果能有详细的日志就更好了 HOT 1
- [国内直连,国外加速]希望有全新模式可以使用 HOT 1
- RC Config file without standard
- 一个精简替代 | A simple stupid alternative HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cow.