Skip to content
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

failed to handshake: pin verification failed #285

Open
topmaker2019 opened this issue Jan 5, 2025 · 3 comments
Open

failed to handshake: pin verification failed #285

topmaker2019 opened this issue Jan 5, 2025 · 3 comments

Comments

@topmaker2019
Copy link

topmaker2019 commented Jan 5, 2025

Why it not work with this site and some others? Please help me, I'm tried almost all options, anyway the same error

package main
import (
"fmt"
"github.com/Noooste/azuretls-client"
)
func main() {
session := azuretls.NewSession()

url := "https://browserleaks.com/ip"

headers := azuretls.OrderedHeaders{
	{"accept", "*/*"},
	{"accept-encoding", "gzip, deflate, br, zstd"},
	{"accept-language", "zh-CN,zh;q=0.9"},
	{"cache-control", "no-cache"},
	{"pragma", "no-cache"},
	{"referer", "https://ti.qq.com/"},
	{"sec-ch-ua", "\"Chromium\";v=\"130\", \"Google Chrome\";v=\"130\", \"NotA_Brand\";v=\"99\""},
	{"sec-ch-ua-mobile", "?0"},
	{"sec-ch-ua-platform", "\"Windows\""},
	{"sec-fetch-dest", "script"},
	{"sec-fetch-mode", "no-cors"},
	{"sec-fetch-site", "cross-site"},
	{"user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"},
}
response, err := session.Get(url, headers)
if err != nil {
	panic(err)
}
fmt.Println(response.StatusCode, string(response.Body))

}

Log:

root@ubuntu:/azure-proxy# go build -o bl bl.go
root@ubuntu:
/azure-proxy# ./bl
panic: failed to handshake: pin verification failed

goroutine 1 [running]:
main.main()
/root/azure-proxy/bl.go:31 +0x778
root@ubuntu:~/azure-proxy#

@Noooste
Copy link
Owner

Noooste commented Jan 5, 2025

Hello, thank you for your report, there is indeed a problem with this site.
You can make session.InsecureSkipVerify = true to bypass this error before the patch arrives.

@Noooste
Copy link
Owner

Noooste commented Jan 7, 2025

Could you describe the errors you encounter when using this proxy code?
I tried it on my side and got an error on my python side because the content was gzip encoded.
Could you give me the logs/errors you have?

@topmaker2019
Copy link
Author

topmaker2019 commented Jan 8, 2025

Thanks! Problem really was with that. Solved

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

No branches or pull requests

2 participants