diff --git a/CHANGELOG b/CHANGELOG index a8ee22ee..24be5e6d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,11 @@ +0.9.8 (2016-06-19) + * Fix OTA support bug in shadowsocks (report by @defia) + * Fix WeChat image url problem (by @breath-co2 @haha1903) + * Fix connection reset detection (by @fgid) + +0.9.7 (2016-05-04) + * Support shadowsocks OTA + 0.9.6 (2015-06-07) * Reload config by sending SIGUSR1 on Unix system * Load blocked/direct/stat file from same directory as rc file by default diff --git a/README-en.md b/README-en.md index c1844d23..32b5b161 100644 --- a/README-en.md +++ b/README-en.md @@ -2,7 +2,7 @@ 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.7 [CHANGELOG](CHANGELOG) +Current version: 0.9.8 [CHANGELOG](CHANGELOG) [![Build Status](https://travis-ci.org/cyfdecyf/cow.png?branch=master)](https://travis-ci.org/cyfdecyf/cow) ## Features diff --git a/README.md b/README.md index 861b21b1..faf3c84c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ COW 是一个简化穿墙的 HTTP 代理服务器。它能自动检测被墙网 [English README](README-en.md). -当前版本:0.9.7 [CHANGELOG](CHANGELOG) +当前版本:0.9.8 [CHANGELOG](CHANGELOG) [![Build Status](https://travis-ci.org/cyfdecyf/cow.png?branch=master)](https://travis-ci.org/cyfdecyf/cow) **欢迎在 develop branch 进行开发并发送 pull request :)** diff --git a/config.go b/config.go index eaf581ad..c3bf294e 100644 --- a/config.go +++ b/config.go @@ -16,7 +16,7 @@ import ( ) const ( - version = "0.9.7" + version = "0.9.8" defaultListenAddr = "127.0.0.1:7777" defaultEstimateTarget = "example.com" ) diff --git a/http.go b/http.go index 4bd7b109..333353c5 100644 --- a/http.go +++ b/http.go @@ -306,7 +306,9 @@ func ParseRequestURIBytes(rawurl []byte) (*URL, error) { port = "443" } } - + // Fixed wechat image url bug, url like http://[::ffff:183.192.196.102]/mmsns/lVxxxxxx + host = strings.TrimSuffix(strings.TrimPrefix(host, "[::ffff:"), "]") + hostport = net.JoinHostPort(host, port) return &URL{hostport, host, port, host2Domain(host), path}, nil } diff --git a/install-cow.sh b/install-cow.sh index 22586d2f..dc279536 100755 --- a/install-cow.sh +++ b/install-cow.sh @@ -1,6 +1,6 @@ #!/bin/bash -version=0.9.7 +version=0.9.8 arch=`uname -m` case $arch in diff --git a/pac.go b/pac.go index 7e2e7f97..42b02baa 100644 --- a/pac.go +++ b/pac.go @@ -116,6 +116,8 @@ function host2Domain(host) { function FindProxyForURL(url, host) { if (url.substring(0,4) == "ftp:") return direct; + if (host.substring(0,7) == "::ffff:") + return direct; if (host.indexOf(".local", host.length - 6) !== -1) { return direct; } diff --git a/proxy_unix.go b/proxy_unix.go index 3c1d4fa1..5c4564fb 100644 --- a/proxy_unix.go +++ b/proxy_unix.go @@ -5,11 +5,12 @@ package main import ( "net" "syscall" + "strings" ) func isErrConnReset(err error) bool { if ne, ok := err.(*net.OpError); ok { - return ne.Err == syscall.ECONNRESET + return strings.Contains(ne.Err.Error(), syscall.ECONNRESET.Error()) } return false }