These older versions had no support for HTTPS to the proxy and simply used plain HTTP even if would be specified. Note that in older versions of the requests library both access with and worked. Therefore, you likely need plain HTTP proxy instead: 'https' : ' ^^^^^^ They still can proxy HTTPS traffic this way, since the client will simply issue a CONNECT request to the proxy to create a tunnel and then use end-to-end TLS between client and server.Īccessing a proxy by HTTPS will add an additional layer of TLS between client and proxy, which is not supported by most proxies. Commonly HTTP proxies have a plain HTTP connections to the proxy only. You cannot have more than one concurrent OpenVPN sessions. Found out more about the cause of this: multiple logged in sessions. It is very likely that the proxy itself does not support TLS connections to the proxy. The connection seems fine after first packet received, then the count down of the time since last packet received reaches <6, the connection resets. This is done because you've explicitly given that URL as the proxy as and not 'https' : ' ^^^^^^ Your code is trying to use the (new) support for accessing the proxy itself over HTTPS. I have also reinstalled both openssl and python with no change. No matter what https proxy I try, I get the same error. The code I am running is: import requests : HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, ' wrong version number (_ssl.c:1123)'))) Return session.request(method=method, url=url, **kwargs)įile "/usr/lib/python3.9/site-packages/requests/sessions.py", line 542, in requestįile "/usr/lib/python3.9/site-packages/requests/sessions.py", line 655, in sendįile "/usr/lib/python3.9/site-packages/requests/adapters.py", line 514, in send Return request('get', url, params=params, **kwargs)įile "/usr/lib/python3.9/site-packages/requests/api.py", line 61, in request : HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, ' wrong version number (_ssl.c:1123)')))įile "/usr/lib/python3.9/site-packages/requests/api.py", line 76, in get Raise MaxRetryError(_pool, url, error or ResponseError(cause)) ![]() Ssl.SSLError: wrong version number (_ssl.c:1123)ĭuring handling of the above exception, another exception occurred:įile "/usr/lib/python3.9/site-packages/requests/adapters.py", line 439, in sendįile "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopenįile "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 573, in increment Ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)įile "/usr/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 466, in _ssl_wrap_socket_implįile "/usr/lib/python3.9/ssl.py", line 500, in wrap_socketįile "/usr/lib/python3.9/ssl.py", line 1040, in _createįile "/usr/lib/python3.9/ssl.py", line 1309, in do_handshake ![]() Same with -tls1 works OK, without any errors.Running python version 3.9.1 on arch linux with OpenSSL version 1.1.1i and pyopenssl version 1.1.1i I get the following error when trying to use an https proxy with the requests module: Traceback (most recent call last):įile "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopenįile "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxyįile "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 359, in connectĬonn = self._connect_tls_proxy(hostname, conn)įile "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 496, in _connect_tls_proxyįile "/usr/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 424, in ssl_wrap_socket Here is an output of openssl s_client -connect :443 -ssl3 CONNECTED(00000004)ģ897:error:14094410:SSL routines:SS元_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1086:SSL alert number 40ģ897:error:1409E0E5:SSL routines:SS元_WRITE_BYTES:ssl handshake failure:s3_pkt.c:530: OpenSSL version: OpenSSL 0.9.8e-fips-rhel5. fixing "fingerprint does not match" errorĬAfile = /path/to/ssl/Īnyone has any insight as to what's happening here? Googled for multiple hours now, can't figure it out. Here is my config: pid = /etc/stunnel/stunnel.pid ![]() At the same time, wget reports: OpenSSL: error:14094410:SSL routines:SS元_READ_BYTES:sslv3 alert handshake failure Tried using wget, and all is smooth with TLSv1, but error shows up with SSLv3. Connecting from Ubuntu using links - no error. Connecting from CentOS using links - error shows up (tried multiple machines). Not all clients trigger that, for some strange reason. Then I encountered errors in log files: SSL_accept: 1408F10B: error:1408F10B:SSL routines:SS元_GET_RECORD:wrong version number ![]() Everything was smooth, and mostly it works as designed. I'm trying to set up Stunnel to server as SSL cache.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |