Skip to content
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

Proxy error: ssl.SSLError: [SSL: WRONG_CURVE] wrong curve (_ssl.c:992) #106

Open
Tangylin opened this issue Dec 25, 2024 · 1 comment
Open

Comments

@Tangylin
Copy link

Tangylin commented Dec 25, 2024

Traceback (most recent call last):
  File "D:\share\blumtod2\bot.py", line 647, in <module>
    asyncio.run(main())
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\asyncio\runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\asyncio\base_events.py", line 650, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "D:\share\blumtod2\bot.py", line 616, in main
    result = await asyncio.gather(*tasks)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\share\blumtod2\bot.py", line 608, in bound
    return await BlumTod(*params).start()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\share\blumtod2\bot.py", line 226, in start
    await self.ipinfo()
  File "D:\share\blumtod2\bot.py", line 100, in ipinfo
    res = await self.http(ipinfo1_url, headers)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\share\blumtod2\bot.py", line 131, in http
    res = await self.ses.get(url, headers=headers)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx\_client.py", line 1768, in get
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx\_client.py", line 1540, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx\_client.py", line 1629, in send
    response = await self._send_handling_auth(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx\_client.py", line 1657, in _send_handling_auth
    response = await self._send_handling_redirects(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx\_client.py", line 1694, in _send_handling_redirects
    response = await self._send_single_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx\_client.py", line 1730, in _send_single_request
    response = await transport.handle_async_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx_socks\_async_transport.py", line 71, in handle_async_request
    resp = await self._pool.handle_async_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpcore\_async\connection_pool.py", line 256, in handle_async_request
    raise exc from None
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpcore\_async\connection_pool.py", line 236, in handle_async_request
    response = await connection.handle_async_request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx_socks\_async_proxy.py", line 149, in handle_async_request
    raise exc
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx_socks\_async_proxy.py", line 122, in handle_async_request
    stream = await self._connect_via_proxy(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx_socks\_async_proxy.py", line 159, in _connect_via_proxy
    return await self._open_stream(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx_socks\_async_proxy.py", line 170, in _open_stream
    return await self._open_aio_stream(host, port, connect_timeout, ssl_context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx_socks\_async_proxy.py", line 195, in _open_aio_stream
    proxy_stream = await proxy.connect(
                   ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\python_socks\async_\anyio\_proxy.py", line 95, in connect
    stream = await stream.start_tls(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\python_socks\async_\anyio\_stream.py", line 45, in start_tls
    ssl_stream = await TLSStream.wrap(
                 ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\anyio\streams\tls.py", line 132, in wrap
    await wrapper._call_sslobject_method(ssl_object.do_handshake)
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\anyio\streams\tls.py", line 140, in _call_sslobject_method
    result = func(*args)
             ^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\ssl.py", line 979, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_CURVE] wrong curve (_ssl.c:992)
@akasakaid
Copy link
Owner

Traceback (most recent call last):
  File "D:\share\blumtod2\bot.py", line 647, in <module>
    asyncio.run(main())
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\asyncio\runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\asyncio\base_events.py", line 650, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "D:\share\blumtod2\bot.py", line 616, in main
    result = await asyncio.gather(*tasks)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\share\blumtod2\bot.py", line 608, in bound
    return await BlumTod(*params).start()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\share\blumtod2\bot.py", line 226, in start
    await self.ipinfo()
  File "D:\share\blumtod2\bot.py", line 100, in ipinfo
    res = await self.http(ipinfo1_url, headers)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\share\blumtod2\bot.py", line 131, in http
    res = await self.ses.get(url, headers=headers)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx\_client.py", line 1768, in get
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx\_client.py", line 1540, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx\_client.py", line 1629, in send
    response = await self._send_handling_auth(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx\_client.py", line 1657, in _send_handling_auth
    response = await self._send_handling_redirects(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx\_client.py", line 1694, in _send_handling_redirects
    response = await self._send_single_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx\_client.py", line 1730, in _send_single_request
    response = await transport.handle_async_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx_socks\_async_transport.py", line 71, in handle_async_request
    resp = await self._pool.handle_async_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpcore\_async\connection_pool.py", line 256, in handle_async_request
    raise exc from None
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpcore\_async\connection_pool.py", line 236, in handle_async_request
    response = await connection.handle_async_request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx_socks\_async_proxy.py", line 149, in handle_async_request
    raise exc
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx_socks\_async_proxy.py", line 122, in handle_async_request
    stream = await self._connect_via_proxy(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx_socks\_async_proxy.py", line 159, in _connect_via_proxy
    return await self._open_stream(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx_socks\_async_proxy.py", line 170, in _open_stream
    return await self._open_aio_stream(host, port, connect_timeout, ssl_context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\httpx_socks\_async_proxy.py", line 195, in _open_aio_stream
    proxy_stream = await proxy.connect(
                   ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\python_socks\async_\anyio\_proxy.py", line 95, in connect
    stream = await stream.start_tls(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\python_socks\async_\anyio\_stream.py", line 45, in start_tls
    ssl_stream = await TLSStream.wrap(
                 ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\anyio\streams\tls.py", line 132, in wrap
    await wrapper._call_sslobject_method(ssl_object.do_handshake)
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\site-packages\anyio\streams\tls.py", line 140, in _call_sslobject_method
    result = func(*args)
             ^^^^^^^^^^^
  File "C:\Users\tangyonglin\miniconda3\envs\blumtod2\Lib\ssl.py", line 979, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_CURVE] wrong curve (_ssl.c:992)

For the latest version does not support proxy, when using proxy fails to pass cloudflare. I will try to find a solution later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants