yifeikong / 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.62k stars 205 forks source link

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

Closed ham2530 closed 3 hours ago

ham2530 commented 1 month 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})
yifeikong commented 1 month ago

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

ham2530 commented 1 month ago

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

回头换个Ubu的环境试下

ham2530 commented 1 month ago

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

yifeikong commented 1 month ago

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

ham2530 commented 4 weeks ago

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

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