-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crypto/tls: TLS handshake timeout #44267
Comments
This isn;t enough info to investigate or reproduce the error |
The URL I'm trying to access is:
|
Can you tcp dump the connection made from your go code? |
Also, does the timeout occur when you use the default http transport? |
Yes. It does not change. |
Also It only occurs with some Internet Providers. |
|
This pcap is talking to a different host, 104.26.10.226, than the curl conversation your provided before. Are you sure they’re the same? |
It might be related to Cloudflare. Now curl is also using the same IP:
|
Looks like the start of a TLS session to me. Is someone MITMing your connection? |
We have a high internet censorship in Iran. It might be related to that. |
It's quite likely. Is there anything that you think can be done in Go to address this problem (I cannot think of anything offhand), or should we close this issue? |
I think it might be a |
It might been that the signature on the wire that Go emits does not look like a browser or curl, hence triggering whatever firewalls your government puts in place. I am going to make this issue as NeedsInvestigation |
cc @FiloSottile |
@moeen
|
@moeen, checked Packet Capture you've provided, Go client reports
It looks like you're hitting golang/go/issues/19561. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I have tested this with Go 1.13+.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have a http.Client like this:
And I send a HTTP request with:
res, err := client.Get(url)
What did you expect to see?
It should return a 2xx response without any error.
What did you see instead?
I get
net/http: TLS handshake timeout
.Same URL works perfectly with
curl
.I have also tried with
InsecureSkipVerify: true
but it didn't change anything.The text was updated successfully, but these errors were encountered: