From 606cc7a32b5b51f77da0c638b34c3f4994b67702 Mon Sep 17 00:00:00 2001 From: fgid Date: Sat, 4 Jun 2016 18:43:31 +0800 Subject: [PATCH 1/4] Fix conn reset handling for go 1.6.1 When using go 1.6.1, after adding some debug, I find: ne.Err.Error() is "read: connection reset by peer" but syscall.ECONNRESET.Error() is "connection reset by peer" They are not equal, so I make this fix to work around. Since 0.9.7 build is also built with go 1.6.1, I think it is the root cause causing #445 #454 --- proxy_unix.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 } From ee5dbf53ca4dc1f531d3010fd8aa053789a40d8b Mon Sep 17 00:00:00 2001 From: breath-co2 Date: Sun, 1 May 2016 21:40:07 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E6=9C=8B=E5=8F=8B=E5=9C=88=E5=9B=BE=E7=89=87=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=89=93=E5=BC=80=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #439 解决微信朋友圈图片不能打开的问题 --- pac.go | 2 ++ 1 file changed, 2 insertions(+) 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; } From e42c30c2c4b511420678233a48c95a76f0d1b1de Mon Sep 17 00:00:00 2001 From: haha1903 Date: Sun, 5 Jun 2016 20:34:00 +0800 Subject: [PATCH 3/4] Fixed wechat image url bug. --- http.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 } From 1f2130faecabdc5cdacfd439a68570137b51f18c Mon Sep 17 00:00:00 2001 From: Chen Yufei Date: Sun, 19 Jun 2016 23:47:22 +0800 Subject: [PATCH 4/4] Bump version to 0.9.8 --- CHANGELOG | 8 ++++++++ README-en.md | 2 +- README.md | 2 +- config.go | 2 +- install-cow.sh | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) 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 b90c75b9..0c957b8f 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=develop)](https://travis-ci.org/cyfdecyf/cow) ## Features diff --git a/README.md b/README.md index 9cd5287f..8cb48d34 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=develop)](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/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