Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

go get 总是报 “ TLS handshake timeout” 错误 #478

Open
moooofly opened this issue Jun 18, 2019 · 3 comments
Open

go get 总是报 “ TLS handshake timeout” 错误 #478

moooofly opened this issue Jun 18, 2019 · 3 comments

Comments

@moooofly
Copy link

moooofly commented Jun 18, 2019

问题描述

local 侧监听 127.0.0.1:8123

2019/06/18 09:43:27 available remote server x.xx.xx.xx:8388
2019/06/18 09:43:27 starting local socks5 server at 127.0.0.1:8123 ...

通过 proxy 进行 go get 代码下载,报 “net/http: TLS handshake timeout”

$go get -v -u golang.org/x/time
Fetching https://golang.org/x/time?go-get=1
https fetch failed: Get https://golang.org/x/time?go-get=1: net/http: TLS handshake timeout
package golang.org/x/time: unrecognized import path "golang.org/x/time" (https fetch: Get https://golang.org/x/time?go-get=1: net/http: TLS handshake timeout)

对应的 ss local 的 debug 日志

[DEBUG] 10:02:41 socks connect from 127.0.0.1:56044
[DEBUG] 10:02:41 connected to golang.org:443 via xx.xx.xx.xx:8388
[DEBUG] 10:02:51 closed connection to golang.org:443

通过 curl 进行 fq 确认

$curl cip.cc
IP      : 198.13.45.154
地址    : 日本  东京都  东京
运营商  : choopa.com

数据二  : 日本 | 东京vultr数据中心

数据三  : 日本东京都东京

URL     : https://www.cip.cc/xx.xx.xx.xx

对应的 ss local 的 debug 日志

[DEBUG] 10:03:04 socks connect from 127.0.0.1:56050
[DEBUG] 10:03:04 connected to cip.cc:80 via xx.xx.xx.xx:8388
[DEBUG] 10:03:05 closed connection to cip.cc:80

对比来看,似乎和经过 proxy 访问时所耗费的时间有一定关系;

  • 执行 go get 时,10s 后主动关闭连接
  • 执行 curl 时,1s 后主动关闭连接

版本

  • shadowsocks-local-linux64-1.2.2
  • shadowsocks-server-linux64-1.2.2

配置文件

$cat config.json
{
    "server":"xx.xx.xx.xx",
    "server_port":8388,
    "local_port":8123,
    "local_address":"127.0.0.1",
    "password":"........",
    "method": "aes-256-cfb",
    "timeout":600
}

求教,还有什么配置可以进行调整

补充

在执行 go get 时,还会报其他类型的错误

Fetching https://golang.org/x/time?go-get=1
https fetch failed: Get https://golang.org/x/time?go-get=1: unexpected EOF
package golang.org/x/time: unrecognized import path "golang.org/x/time" (https fetch: Get https://golang.org/x/time?go-get=1: unexpected EOF)
Fetching https://golang.org/x/time?go-get=1
Parsing meta tags from https://golang.org/x/time?go-get=1 (status code 200)
get "golang.org/x/time": found meta tag get.metaImport{Prefix:"golang.org/x/time", VCS:"git", RepoRo                                                                                          ot:"https://go.googlesource.com/time"} at https://golang.org/x/time?go-get=1
golang.org/x/time (download)
# cd .; git clone https://go.googlesource.com/time /go/src/golang.org/x/time
Cloning into '/go/src/golang.org/x/time'...
fatal: unable to access 'https://go.googlesource.com/time/': gnutls_handshake() failed: The TLS conn                                                                                          ection was non-properly terminated.
package golang.org/x/time: exit status 128

似乎所有错误都和网络链接断开有关

@xiquyila
Copy link

顶一下楼主,小可也碰到相同的问题。

@lixingcong
Copy link

今天用ss-libev也遭遇到了干扰,以前不是这样的:表现为TCP流量经常wrong TLS,换加密方式换端口无解,换IP可解。

@xiquyila
Copy link

今天用ss-libev也遭遇到了干扰,以前不是这样的:表现为TCP流量经常wrong TLS,换加密方式换端口无解,换IP可解。

你的情况看起来是被墙了?
我的问题找到了,是因为export https_proxy=https://127.0.0.1:8118 配置成了export https_proxy=https://127.0.0.1:8118 导致一直TLS报错 ...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants