升级到2.2-rc1后,用wss报错?

111 views
Skip to first unread message

weijia Li

unread,
Oct 6, 2016, 8:04:18 AM10/6/16
to go-gost
这是logs。

root@XiaoQiang:~# /userdisk/data/usr/bin/gost -L=:2222 -F=WSS://gost.herokuapp.com:443 -logtostderr -v=4
I1006 12:00:21.819691   29096 gost.go:115] open cert.pem: no such file or directory
I1006 12:00:37.207981   29096 server.go:134] 192.168.1.183:63610 - :2222
I1006 12:00:37.208564   29096 http.go:32] [http] CONNECT 192.168.1.183:63610 - hcl.baidu.com:443 HTTP/1.1
I1006 12:00:37.208812   29096 http.go:36] CONNECT hcl.baidu.com:443 HTTP/1.1
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36


I1006 12:00:37.212629   29096 server.go:134] 192.168.1.183:63611 - :2222
I1006 12:00:37.213118   29096 http.go:32] [http] CONNECT 192.168.1.183:63611 - www.hao123.com:443 HTTP/1.1
I1006 12:00:37.213326   29096 http.go:36] CONNECT www.hao123.com:443 HTTP/1.1
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36


I1006 12:00:37.270581   29096 server.go:134] 192.168.1.183:63613 - :2222
I1006 12:00:37.270922   29096 http.go:32] [http] CONNECT 192.168.1.183:63613 - www.hao123.com:443 HTTP/1.1
I1006 12:00:37.271041   29096 http.go:36] CONNECT www.hao123.com:443 HTTP/1.1
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36


I1006 12:00:37.467505   29096 server.go:134] 192.168.1.183:63614 - :2222
I1006 12:00:37.467828   29096 http.go:32] [http] CONNECT 192.168.1.183:63614 - gsp1.baidu.com:443 HTTP/1.1
I1006 12:00:37.467944   29096 http.go:36] CONNECT gsp1.baidu.com:443 HTTP/1.1
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36


I1006 12:00:38.998721   29096 http.go:110] [http] 192.168.1.183:63613 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:00:38.998895   29096 http.go:114] [http] 192.168.1.183:63613 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

I1006 12:00:39.033603   29096 http.go:110] [http] 192.168.1.183:63614 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:00:39.033740   29096 http.go:114] [http] 192.168.1.183:63614 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

I1006 12:00:39.091895   29096 server.go:134] 192.168.1.183:63615 - :2222
I1006 12:00:39.093445   29096 http.go:32] [http] GET 192.168.1.183:63615 - www.hao123.com HTTP/1.1
I1006 12:00:39.093713   29096 http.go:36] GET http://www.hao123.com/ HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, sdch
Accept-Language: zh-CN,zh;q=0.8
Cookie: BDUSS=242WVpwT1luUGo1ZUdpeH5wbnJEVGtWMjY4NDRyVjFhazd4MTJ2NWI3YlhBLVJYQVFBQUFBJCQAAAAAAAAAAAEAAABoPcUramx6c3NzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANd2vFfXdrxXU; yun_tip=1; Hm_lvt_22661fc940aadd927d385f4a67892bc3=1472697502; HAOSTOKEN=bbd9f2188fb8a777d050b3f09328b8dee9e08e9c050ad76c67f86375630b02f4; stip2=1; scrollflag=1474562392645; BAIDUID=9BE61A57D269B0DFECBCFCC7131D828C:FG=1; nonUnion=1; ft=1; tvtip_notshow=1_1; FLASHID=9BE61A57D269B0DFECBCFCC7131D828C:FG=1; hz=0; BID=7B61DBAF6864A38D9C9A66DF34339213:FG=1; HUM=; HUN=; mtip=1; tnwhiteft=XzFYUBclcWbsPjcLrHTLgv99Udqsuzc_cMw1cWCkPjTdP1fLP1bYxf; toptips=0; newloc=%7C%7C; loc2=1%7C%E6%96%B0%E7%96%86%7C%E4%B9%8C%E9%B2%81%E6%9C%A8%E9%BD%90; org=1; __bsi=16619575349448998882_00_217_N_N_82_0303_c02f_Y; mingzhan_recom=1; PMS_JT=%28%7B%22s%22%3A1475755235981%2C%22r%22%3A%22https%3A//www.hao123.com/%3Ftn%3D90427977_hao_pg%22%7D%29
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36


I1006 12:00:39.286490   29096 server.go:134] 192.168.1.183:63616 - :2222
I1006 12:00:39.286861   29096 http.go:32] [http] CONNECT 192.168.1.183:63616 - freegeoip.net:443 HTTP/1.1
I1006 12:00:39.286978   29096 http.go:36] CONNECT freegeoip.net:443 HTTP/1.1
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36


I1006 12:00:40.006161   29096 http.go:110] [http] 192.168.1.183:63611 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:00:40.006263   29096 http.go:114] [http] 192.168.1.183:63611 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

I1006 12:00:40.010052   29096 http.go:110] [http] 192.168.1.183:63610 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:00:40.010145   29096 http.go:114] [http] 192.168.1.183:63610 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

I1006 12:00:40.216143   29096 server.go:134] 192.168.1.183:63612 - :2222
I1006 12:00:40.782926   29096 http.go:110] [http] 192.168.1.183:63616 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:00:40.783021   29096 http.go:114] [http] 192.168.1.183:63616 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

I1006 12:00:40.796847   29096 server.go:134] 192.168.1.183:63617 - :2222
I1006 12:00:40.797630   29096 http.go:32] [http] GET 192.168.1.183:63617 - ip-api.com HTTP/1.1
I1006 12:00:40.797804   29096 http.go:36] GET http://ip-api.com/json/www.hao123.com HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, sdch
Accept-Language: zh-CN,zh;q=0.8
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36


I1006 12:00:42.414672   29096 http.go:110] [http] 192.168.1.183:63615 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:00:42.414847   29096 http.go:114] [http] 192.168.1.183:63615 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

I1006 12:00:42.424326   29096 server.go:134] 192.168.1.183:63618 - :2222
I1006 12:00:42.426527   29096 http.go:32] [http] GET 192.168.1.183:63618 - www.hao123.com HTTP/1.1
I1006 12:00:42.426672   29096 http.go:36] GET http://www.hao123.com/ HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, sdch
Accept-Language: zh-CN,zh;q=0.8
Cookie: BDUSS=242WVpwT1luUGo1ZUdpeH5wbnJEVGtWMjY4NDRyVjFhazd4MTJ2NWI3YlhBLVJYQVFBQUFBJCQAAAAAAAAAAAEAAABoPcUramx6c3NzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANd2vFfXdrxXU; yun_tip=1; Hm_lvt_22661fc940aadd927d385f4a67892bc3=1472697502; HAOSTOKEN=bbd9f2188fb8a777d050b3f09328b8dee9e08e9c050ad76c67f86375630b02f4; stip2=1; scrollflag=1474562392645; BAIDUID=9BE61A57D269B0DFECBCFCC7131D828C:FG=1; nonUnion=1; ft=1; tvtip_notshow=1_1; FLASHID=9BE61A57D269B0DFECBCFCC7131D828C:FG=1; hz=0; BID=7B61DBAF6864A38D9C9A66DF34339213:FG=1; HUM=; HUN=; mtip=1; tnwhiteft=XzFYUBclcWbsPjcLrHTLgv99Udqsuzc_cMw1cWCkPjTdP1fLP1bYxf; toptips=0; newloc=%7C%7C; loc2=1%7C%E6%96%B0%E7%96%86%7C%E4%B9%8C%E9%B2%81%E6%9C%A8%E9%BD%90; org=1; __bsi=16619575349448998882_00_217_N_N_82_0303_c02f_Y; mingzhan_recom=1; PMS_JT=%28%7B%22s%22%3A1475755235981%2C%22r%22%3A%22https%3A//www.hao123.com/%3Ftn%3D90427977_hao_pg%22%7D%29
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36


I1006 12:00:43.925286   29096 http.go:110] [http] 192.168.1.183:63618 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:00:43.925461   29096 http.go:114] [http] 192.168.1.183:63618 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

I1006 12:00:44.094692   29096 http.go:110] [http] 192.168.1.183:63617 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:00:44.094831   29096 http.go:114] [http] 192.168.1.183:63617 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

I1006 12:00:44.147421   29096 server.go:134] 192.168.1.183:63619 - :2222
I1006 12:00:44.148363   29096 http.go:32] [http] GET 192.168.1.183:63619 - smart-ip.net HTTP/1.1
I1006 12:00:44.148565   29096 http.go:36] GET http://smart-ip.net/geoip-json/www.hao123.com HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, sdch
Accept-Language: zh-CN,zh;q=0.8
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36


I1006 12:00:45.649613   29096 http.go:110] [http] 192.168.1.183:63619 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:00:45.649716   29096 http.go:114] [http] 192.168.1.183:63619 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

I1006 12:00:45.686009   29096 server.go:134] 192.168.1.183:63620 - :2222
I1006 12:00:45.687224   29096 http.go:32] [http] GET 192.168.1.183:63620 - ipinfo.io HTTP/1.1
I1006 12:00:45.687358   29096 http.go:36] GET http://ipinfo.io/192.168.1.1/geo HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, sdch
Accept-Language: zh-CN,zh;q=0.8
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36


I1006 12:00:47.163529   29096 http.go:110] [http] 192.168.1.183:63620 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:00:47.163631   29096 http.go:114] [http] 192.168.1.183:63620 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

I1006 12:00:55.907183   29096 server.go:140] EOF
I1006 12:00:55.908166   29096 server.go:134] 192.168.1.183:63621 - :2222
I1006 12:00:55.908518   29096 http.go:32] [http] CONNECT 192.168.1.183:63621 - mail.google.com:443 HTTP/1.1
I1006 12:00:55.908659   29096 http.go:36] CONNECT mail.google.com:443 HTTP/1.1
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36


I1006 12:00:57.375520   29096 http.go:110] [http] 192.168.1.183:63621 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:00:57.375622   29096 http.go:114] [http] 192.168.1.183:63621 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

I1006 12:01:05.924878   29096 server.go:134] 192.168.1.183:63625 - :2222
I1006 12:01:05.925430   29096 http.go:32] [http] CONNECT 192.168.1.183:63625 - clients4.google.com:443 HTTP/1.1
I1006 12:01:05.925571   29096 http.go:36] CONNECT clients4.google.com:443 HTTP/1.1
Proxy-Connection: keep-alive
User-Agent: Chrome WIN 53.0.2785.143 (62cc26356a4c69f2824c7c5c5ec8decaa603ebbb) channel(unknown)


I1006 12:01:07.394747   29096 http.go:110] [http] 192.168.1.183:63625 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:01:07.394842   29096 http.go:114] [http] 192.168.1.183:63625 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

I1006 12:01:16.278557   29096 server.go:134] 192.168.1.183:63626 - :2222
I1006 12:01:16.279152   29096 http.go:32] [http] CONNECT 192.168.1.183:63626 - lp-push-server-276.lastpass.com:443 HTTP/1.1
I1006 12:01:16.279342   29096 http.go:36] CONNECT lp-push-server-276.lastpass.com:443 HTTP/1.1
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36


I1006 12:01:17.616183   29096 http.go:110] [http] 192.168.1.183:63626 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:01:17.616285   29096 http.go:114] [http] 192.168.1.183:63626 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

I1006 12:01:21.837739   29096 server.go:134] 192.168.1.183:63627 - :2222
I1006 12:01:21.838160   29096 http.go:32] [http] CONNECT 192.168.1.183:63627 - www.baidu.com:443 HTTP/1.1
I1006 12:01:21.838298   29096 http.go:36] CONNECT www.baidu.com:443 HTTP/1.1
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36


I1006 12:01:23.157380   29096 http.go:110] [http] 192.168.1.183:63627 -> gost.herokuapp.com:443 : websocket: bad handshake
I1006 12:01:23.157556   29096 http.go:114] [http] 192.168.1.183:63627 <- gost.herokuapp.com:443
HTTP/1.1 503 Service unavailable
Proxy-Agent: gost/2.2-rc1

Rain Zen

unread,
Oct 6, 2016, 8:28:40 AM10/6/16
to go-gost
服务端运行命令及log有吗?

在 2016年10月6日星期四 UTC+8下午8:04:18,weijia Li写道:

weijia Li

unread,
Oct 6, 2016, 9:09:35 AM10/6/16
to go-gost
服务端就是你前面说的那个 web: gost -L="ws://:$PORT"


在 2016年10月6日星期四 UTC+8下午8:04:18,weijia Li写道:
这是logs。

weijia Li

unread,
Oct 6, 2016, 9:11:13 AM10/6/16
to go-gost
我是在heroku上面部署的。

在 2016年10月6日星期四 UTC+8下午8:04:18,weijia Li写道:
这是logs。

weijia Li

unread,
Oct 6, 2016, 9:22:25 AM10/6/16
to go-gost
是不是在heroku上编译没有生成gost,我在windows上编译的时候编译成功但没有生成gost可执行文件,必须到main.go文件夹下,才能生成。


在 2016年10月6日星期四 UTC+8下午8:04:18,weijia Li写道:
这是logs。

Rain Zen

unread,
Oct 6, 2016, 9:25:06 AM10/6/16
to go-gost
这一版代码结构调整了,要生成可执行文件要在cmd/gost目录中编译。

在 2016年10月6日星期四 UTC+8下午9:22:25,weijia Li写道:

weijia Li

unread,
Oct 6, 2016, 9:47:29 AM10/6/16
to go-gost
部署成功,谢谢作者。


在 2016年10月6日星期四 UTC+8下午8:04:18,weijia Li写道:
这是logs。

luxun

unread,
Oct 6, 2016, 1:44:40 PM10/6/16
to go-gost
怎么解决的,我今天也遇到这个问题了


在 2016年10月6日星期四 UTC+8下午8:04:18,weijia Li写道:
这是logs。

weijia Li

unread,
Oct 6, 2016, 10:55:43 PM10/6/16
to go-gost
在cmd\gost下编译


在 2016年10月6日星期四 UTC+8下午8:04:18,weijia Li写道:
这是logs。

Tai Philip

unread,
Oct 7, 2016, 12:01:03 AM10/7/16
to go-gost
在cmd/gost目录下编译成功了,但是上网还是bad handshake,server端 logs

2016-10-07T03:55:13.193682+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/ws" host=xxxxx.herokuapp.com request_id=
10a72e19-9338-44c8-8e0a-e3c47d0fd225 fwd="11.22.33.44" dyno= connect= service
= status=503 bytes=

不知道如何解决。

weijia Li於 2016年10月7日星期五 UTC+8上午10時55分43秒寫道:

weijia Li

unread,
Oct 7, 2016, 12:06:38 AM10/7/16
to go-gost
服务端是 web: gost -L="ws://:$PORT" 吗?


在 2016年10月6日星期四 UTC+8下午8:04:18,weijia Li写道:
这是logs。

Tai Philip

unread,
Oct 7, 2016, 12:13:31 AM10/7/16
to go-gost
是的,你那边没有问题吗?我把Procfile放入\cmd\gost\vendor\github.com\ginuerzh\gost,编译显示成功,但是运行就出错,2.1版完全没问题。

weijia Li於 2016年10月7日星期五 UTC+8下午12時06分38秒寫道:

luxun

unread,
Oct 7, 2016, 12:35:55 AM10/7/16
to go-gost

godeps vendor procfile 放哪儿啊,我这么放怎么不行


在 2016年10月6日星期四 UTC+8下午8:04:18,weijia Li写道:
这是logs。
Message has been deleted

weijia Li

unread,
Oct 7, 2016, 12:44:15 AM10/7/16
to go-gost
godeps和vendor还有procfile都要放在cmd\gost文件夹下。


在 2016年10月6日星期四 UTC+8下午8:04:18,weijia Li写道:
这是logs。

luxun

unread,
Oct 7, 2016, 12:49:05 AM10/7/16
to go-gost

是这么放吗?那上传时候是不是只上传那个 /cmd/gost 目录就行了啊? 

在 2016年10月7日星期五 UTC+8下午12:44:15,weijia Li写道:

weijia Li

unread,
Oct 7, 2016, 12:55:22 AM10/7/16
to go-gost
你用的c9是吧,我说的是heroku,c9平台只要下载作者编译好的linux版gost,再在命令行下输入 gost -L ws://:8080 就行了。不过c9平台现在限速了,不好用了,最好使用heroku平台。

在 2016年10月6日星期四 UTC+8下午8:04:18,weijia Li写道:
这是logs。

weijia Li

unread,
Oct 7, 2016, 12:57:18 AM10/7/16
to go-gost
c9平台应该是:
服务端:
gost -L ws://:8080
客户端:
gost -L :8899 -F wss://xxx-xxxxx.c9.io:443

在 2016年10月6日星期四 UTC+8下午8:04:18,weijia Li写道:
这是logs。

Tai Philip

unread,
Oct 7, 2016, 1:01:11 AM10/7/16
to go-gost
好啦,搞定,一个文件放错位置了。感谢指点。

weijia Li於 2016年10月7日星期五 UTC+8下午12時44分15秒寫道:

luxun

unread,
Oct 7, 2016, 1:14:14 AM10/7/16
to go-gost
你理解错啦,我不是在C9上运行,我是利用C9上传到heroku上

在 2016年10月7日星期五 UTC+8下午12:55:22,weijia Li写道:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages