imroc / req

Simple Go HTTP client with Black Magic
https://req.cool
MIT License
4.12k stars 334 forks source link

使用h2协议,设置随机TLS指纹的时候出现问题:http2: unexpected ALPN protocol ""; want "h2" #336

Open ChetWei opened 3 months ago

ChetWei commented 3 months ago

response, err := req.C().EnableForceHTTP2(). SetTLSFingerprintChrome(). SetProxyURL(requestInfo.Proxy).R()......... 这样是没有问题的,但是当我使用SetTLSFingerprintRandomized() 或者 SetTLSFingerprintAndroid()都会报错: http2: unexpected ALPN protocol ""; want "h2" panic: runtime error: invalid memory address or nil pointer dereference。 其他类型的指纹也可能有类似的问题

ChetWei commented 3 months ago

另外,这里设置的代理也没有生效