coyove / goflyway

An encrypted HTTP server
MIT License
4.31k stars 654 forks source link

goflyway linux client上无法使用cloudflare连接到linux goflyway server #109

Closed zqw86713 closed 5 years ago

zqw86713 commented 5 years ago

有没有人和我一样,在linux goflyway client上无法使用cdn连接到linux goflyway server的?

zqw86713 commented 5 years ago

经三次以上的确认,我在Linux client上使用的命令如下 ,环境为debian 9 x86_64.

当我使用CDN的方法时,是无法连接上goflyway server的。 ./goflyway -k=1234 up="cf:/abc.com:2095" -g

当我使用IP的方式时,是可以正常连接的。 ./goflyway -k=1234 -up="1.2.3.4:2095" -g

我不会导出debug日志,可否请开发者告之我具体的命令? 是否是 ./goflyway -k=1234 -up="1.2.3.4:2095" -g -lv dbg > debug.txt

coyove commented 5 years ago

日志是打到stderr上的,所以需要用2>&1

zqw86713 commented 5 years ago

root@zhenjiang:~/goflyway# ./goflyway -up="cf://abc.com:2095" -k="83529174" -l=":8100" -web-port="8101" -lv=log -g -U=http 2018-10-04 09:35:51.037 CST,main.go:266, LOG ,Build,goflyway 180927033307 2018-10-04 09:35:51.038 CST,main.go:269, LOG ,Role,Client 2018-10-04 09:35:51.156 CST,main.go:299, LOG ,ACL,Source,chinalist.txt 2018-10-04 09:35:51.156 CST,main.go:466, LOG ,Upstream,cf://abc.com:2095 2018-10-04 09:35:51.157 CST,main.go:483, LOG ,Cloudflare,abc.com:2095 2018-10-04 09:35:51.157 CST,main.go:493, LOG ,Dial,Server,abc.com:2095 2018-10-04 09:35:51.157 CST,main.go:498, LOG ,Websocket,Enabled 2018-10-04 09:35:51.157 CST,main.go:328, LOG ,Global Proxy,Enabled 2018-10-04 09:35:51.157 CST,main.go:404, LOG ,Alias,DC218B 2018-10-04 09:35:51.158 CST,main.go:407, LOG ,Client,Dial,abc.com:2095 2018-10-04 09:35:51.158 CST,main.go:445, LOG ,Client,Proxy started,0.0.0.0:8100 2018-10-04 09:35:51.158 CST,main.go:441, LOG ,Client,Web console,127.0.0.1:8101 2018-10-04 09:35:59.133 CST,httpmux.go:39, ERROR ,HTTP/SOCKS,Prefetch,"read 64.231.105.254:56295, i/o timeout" 2018-10-04 09:36:01.133 CST,httpmux.go:39, ERROR ,HTTP/SOCKS,Prefetch,"read 64.231.105.254:56299, i/o timeout" 2018-10-04 09:36:03.134 CST,httpmux.go:39, ERROR ,HTTP/SOCKS,Prefetch,"read 64.231.105.254:56305, i/o timeout" 2018-10-04 09:36:04.129 CST,io.go:85, ERROR ,Bridge,"read 64.231.105.254:56319, C104, read: connection reset by peer" 2018-10-04 09:36:04.200 CST,io.go:85, ERROR ,Bridge,"read 64.231.105.254:56322, C104, read: connection reset by peer" 2018-10-04 09:36:07.606 CST,io.go:85, ERROR ,Bridge,"read 64.231.105.254:56347, C104, read: connection reset by peer" 2018-10-04 09:36:08.098 CST,io.go:85, ERROR ,Bridge,"read 64.231.105.254:56360, C104, read: connection reset by peer" 2018-10-04 09:36:15.111 CST,httpmux.go:39, ERROR ,HTTP/SOCKS,Prefetch,"read 64.231.105.254:56422, i/o timeout" 2018-10-04 09:36:15.951 CST,io.go:85, ERROR ,Bridge,"read 64.231.105.254:56424, C104, read: connection reset by peer" 2018-10-04 09:36:17.112 CST,httpmux.go:39, ERROR ,HTTP/SOCKS,Prefetch,"read 64.231.105.254:56433, i/o timeout" 2018-10-04 09:36:51.628 CST,io.go:85, ERROR ,Bridge,"read 64.231.105.254:56543, C104, read: connection reset by peer" 2018-10-04 09:36:51.645 CST,io.go:85, ERROR ,Bridge,"read 64.231.105.254:56544, C104, read: connection reset by peer" 2018-10-04 09:37:01.301 CST,io.go:85, ERROR ,Bridge,"read 64.231.105.254:56569, C104, read: connection reset by peer"

zqw86713 commented 5 years ago

以上是我的日志。

以下是我运行的命令, ./goflyway -up="cf://abc.com:2095" -k="1234" -l=":8100" -web-port="8101" -lv=log -g -U=http

在命令运行后,大约10秒之内可以连接server,10秒之后就无法连接上server。

coyove commented 5 years ago

64.231.105.254 是什么? 从错误信息来看像是IPS的网关。

zqw86713 commented 5 years ago

我人在加拿大,64.231.105.254 是我 在加拿大的IP地址。 以下是我的搭建环境:

client: VPS运行client, (机房在江苏镇江),使用cloudflare。 server: goflyway server(机房在香港 ),

然后我在加拿大的家中用http proxy的方式去连接VPS 的8100端口,看看我的IP地址会不会显示为香港。请问开发者,这个思路可行吗?

coyove commented 5 years ago

登陆client所在的vps,保留你输入的命令,后面加上: -get https://google.com,如果成功代表服务端没有问题。

zqw86713 commented 5 years ago

2018-10-04 09:54:19.580 CST,main.go:266, LOG ,Build,goflyway 180927033307 2018-10-04 09:54:19.580 CST,main.go:269, LOG ,Role,Client 2018-10-04 09:54:19.697 CST,main.go:299, LOG ,ACL,Source,chinalist.txt 2018-10-04 09:54:19.698 CST,main.go:466, LOG ,Upstream,cf://superla.stream:2095 2018-10-04 09:54:19.698 CST,main.go:483, LOG ,Cloudflare,superla.stream:2095 2018-10-04 09:54:19.698 CST,main.go:493, LOG ,Dial,Server,superla.stream:2095 2018-10-04 09:54:19.698 CST,main.go:498, LOG ,Websocket,Enabled 2018-10-04 09:54:19.698 CST,main.go:328, LOG ,Global Proxy,Enabled 2018-10-04 09:54:19.698 CST,main.go:404, LOG ,Alias,DC218B 2018-10-04 09:54:19.699 CST,main.go:407, LOG ,Client,Dial,superla.stream:2095 <!doctype html>Google




 

進階搜尋語言工具

Google 提供: 中文(简体) English

© 2018 - 私隱權政策 - 條款

2018-10-04 09:54:20.603 CST,main.go:641, LOG ,CURL,Completed in 0.904s root@zhenjiang:~/goflyway#

zqw86713 commented 5 years ago

谢谢你的回答。我按照你的说去做了,然后把log上传了。以上就是Log. 这表示是连接成功还是不成功?

coyove commented 5 years ago

从输出看,客户端和服务端都没有问题,从加拿大连镇江时出现问题。

zqw86713 commented 5 years ago

是这样吗?好的。那我让国内的朋友,使用http proxy 来连接我的client,看能不能连接上。

谢谢你的解答。这个软件很有用。

zqw86713 commented 5 years ago

problem solved, case closed.