lexiforest / curl_cffi

Python binding for curl-impersonate via cffi. A http client that can impersonate browser tls/ja3/http2 fingerprints.
https://curl-cffi.readthedocs.io/
MIT License
1.95k stars 242 forks source link

[BUG] multi-threaded requests, there will be certificate errors. #321

Closed ham2530 closed 2 months ago

ham2530 commented 3 months ago

Failed to perform, curl: (35) BoringSSL SSL_connect: SSL_ERROR_SYSCALL When making multi-threaded requests, there will be certificate errors.

response =requests.post(url, data=data_str, headers=headers, proxy=port,impersonate='chrome99',curl_options={CurlOpt.SSL_VERIFYHOST:1})
perklet commented 3 months ago

Are you on Windows with proxies? If so, there is no obvious solutions right now, see #229.

ham2530 commented 3 months ago

感谢,看了文档,是底层的ssl库了

回头换个Ubu的环境试下

ham2530 commented 3 months ago

测试了,并发超过3还是会报BoringSSL SSL_connect的问题,在Ubuntu环境

perklet commented 3 months ago

贴一下能复现的代码吧,我试一下

ham2530 commented 3 months ago

没问题了,放在云服务器,丢包概率低

不能用python的thread多线程跑,改为subprocess的popen,后台开一个命令跑,并发5000没有问题