-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Problems about the proxies #6
Comments
Could you please try the format |
Thanks for you reply. I tried and the error still exist. Out [2]: (CurlError("Failed to perform, ErrCode: 35, Reason: 'error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER'"),) |
i use python 3.7.16 and win11(x64) |
OK, more details could be helpfule. Does it work for proxies without authentication? |
it could work without authentication.
|
TL;DRYou should change Full explainationI believe you are misusing https proxies, which is a very common pitfall. A typical
The connections:
Because the CONNECT is plain http, the proxy address should start with A rare
The connections:
So, you are using a https-over-http proxy as a https-over-https proxy, hence the SSL error. Actually, in
The error message literally says: "Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP" It seems that error message for |
oH ,it works!! many thanks for your excellent works. |
https://github.com/yifeikong/curl_cffi/blob/v0.6.0b7/curl_cffi/requests/session.py#L348 |
It has been relaxed on the main branch, and will be released in next version. |
On my end using a NordVPN proxy (format The user pass is not the account user pass but the Service Credentials in the Nord Dashboard.
|
Do you have any non-ASCII characters in your path of working directory or virtualenv? |
Not that I can tell, no |
What about adding |
Tried that too, but would just give a generic error. |
curl_cffi is not setting PROXY_CAINFO, only CAINFO. Hence the SSL errors. try |
That does in fact work on v0.6.2 with 0 modifications and may be the real fix for everyone in this issue including the original OP. Replacing https://->http:// in the proxy connection URI is not the real fix and may only work if the proxy happens to support both, which NordVPN explicitly turned off HTTP-only proxies back a few years ago. Here is how I set the proxy: session.proxies.update({"all": "https://user:[email protected]:89"})
# now on the same thread that you will download on, do:
session.curl.setopt(CurlOpt.PROXY_CAINFO, session.curl._cacert) (notice I do However, it's very slow. Like very slow. I get about 400-600 kb/s according to my own (likely inaccurate) speed calculation but it is definitely S.L.O.W. I can normally get about 2-3 mb/s easily on requests. It also gives me the imo entirely invalid warning of:
|
Mistakenly writing http tunneling proxy as
Thanks for the pointer, I will add this in future versions.
That's definitely a problem worth investigating. Could you please provide more details? |
It's not a mistake to do this, and if a user does it then it's their own fault. This is not something that should be a warning when it will effect anyone who does in fact need to use a
I just want to quickly note that this will need to be handled by Curl class in
As for this issue, it seems to be related to setting the PROXY_CAINFO too often. If I set it in such a way that it just so happens to set only after a reset() like the current CAINFO, then speeds seem to be as-expected. Either that or it's randomly slow and randomly fast and just so happened to go fast when I changed my code in such a way. Either way I don't think it's something to worry about unless someone else has the problem too. |
…286) See discussion from: #6 (comment) Co-authored-by: coletdjnz <[email protected]>
Thanks for this project!
When i set proxies parameters, i get this error:
(CurlError("Failed to perform, ErrCode: 35, Reason: 'error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER'"),)
the proxy has user name and password. and i set the param. like this:
auth = ["username","pwd"],
The text was updated successfully, but these errors were encountered: