README-en.md
COW is a HTTP proxy to simplify bypassing the great firewall. It tries to automatically identify blocked websites and only use parent proxy for those sites.
Current version: 0.9.8 CHANGELOG
Install:
OS X, Linux (x86, ARM): Run the following command (also for update)
curl -L git.io/cow | bash
Windows: download from the release page
If you are familiar with Go, run go get github.com/cyfdecyf/cow to install from source.
Modify configuration file ~/.cow/rc (OS X or Linux) or rc.txt (Windows). A simple example with the most important options:
# Line starting with # is comment and will be ignored
# Local proxy listen address
listen = http://127.0.0.1:7777
# SOCKS5 parent proxy
proxy = socks5://127.0.0.1:1080
# HTTP parent proxy
proxy = http://127.0.0.1:8080
proxy = http://user:[email protected]:8080
# shadowsocks parent proxy
proxy = ss://aes-128-cfb:[email protected]:8388
# cow parent proxy
proxy = cow://aes-128-cfb:[email protected]:8388
See detailed configuration example for other features.
The PAC file can be accessed at http://<listen>/pac, for the above example: http://127.0.0.1:7777/pac.
Command line options can override options in the configuration file For more details, see the output of cow -h
In ideal situation, you don't need to specify which sites are blocked and which are not, but COW hasen't reached that goal. So you may need to manually specify this if COW made the wrong judgement.
<dir containing rc file>/blocked for blocked sites<dir containing rc file>/direct for directly accessible sitesgoogle.com means *.google.comgoogle.com.hkCOW records all visited hosts and visit count in stat (which is a json file) under the same directory with config file.
statUpon the following error, one domain is considered to be blocked
COW will retry HTTP request upon these errors, But if there's some data sent back to the client, connection with the client will be dropped to signal error..
Server connection reset is usually reliable in detecting blocked sites. But timeout is not. COW tries to estimate timeout value every 30 seconds, in order to avoid considering normal sites as blocked when network condition is bad. Revert to direct access after two minutes upon first blockage is also to avoid mistakes.
If automatica timeout retry causes problem for you, try to change readTimeout and dialTimeout in configuration.
Refer to README.md.