-
-
Notifications
You must be signed in to change notification settings - Fork 999
Description
https://github.com/encode/httpx/discussions
Hey,
When I try to use proxies with httpx I get an SSL error.
Error: httpx.ProxyError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)
Full debug:
Traceback (most recent call last):
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_sync\http_proxy.py", line 227, in _tunnel_request
) = proxy_connection.handle_request(
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_sync\connection.py", line 136, in handle_request
self.socket = self._open_socket(timeout)
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_sync\connection.py", line 163, in _open_socket
return self._backend.open_tcp_stream(
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_backends\sync.py", line 136, in open_tcp_stream
with map_exceptions(exc_map):
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_exceptions.py", line 12, in map_exceptions
raise to_exc(exc) from None
httpcore.ConnectError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 61, in map_httpcore_exceptions
yield
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 180, in handle_request
status_code, headers, byte_stream, extensions = self._pool.handle_request(
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_sync\http_proxy.py", line 127, in handle_request
return self._tunnel_request(
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpcore_sync\http_proxy.py", line 256, in _tunnel_request
raise ProxyError(exc)
httpcore.ProxyError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\kernel\Desktop\numlist stuff\netflix\main.py", line 26, in
req = httpx.get("https://www.netflix.com/fr/login", proxies=proxies)
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_api.py", line 189, in get
return request(
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_api.py", line 100, in request
return client.request(
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 787, in request
return self.send(
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 878, in send
response = self._send_handling_auth(
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 908, in _send_handling_auth
response = self._send_handling_redirects(
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 947, in _send_handling_redirects
response = self._send_single_request(request, timeout)
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 983, in _send_single_request
(status_code, headers, stream, extensions) = transport.handle_request(
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 179, in handle_request
with map_httpcore_exceptions():
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\Users\kernel\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 78, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ProxyError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)
My proxies scheme:
proxies = {
"http://": "http://91.239.130.34:12323",
"https://": "https://91.239.130.34:12323",
}