acheong08 / ChatGPTProxy

Simple Cloudflare bypass for ChatGPT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to fix the error: wrong version number

tocer opened this issue · comments

commented

thanks for any answer.

(revert-chatgpt) [dm@dm-home bin]$ CHATGPT_BASE_URL=https://127.0.0.1:9090/api/ python3 -m revChatGPT.V1

    ChatGPT - A command-line interface to OpenAI's ChatGPT (https://chat.openai.com/chat)
    Repo: github.com/acheong08/ChatGPT
    Version: 6.2

Type '!help' to show a full list of commands
Press Esc followed by Enter or Alt+Enter to send a message.

You:
hello

Chatbot:
Traceback (most recent call last):
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/urllib3/connectionpool.py", line 467, in _make_request
self._validate_conn(conn)
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1092, in _validate_conn
conn.connect()
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/urllib3/connection.py", line 635, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/urllib3/connection.py", line 776, in ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
^^^^^^^^^^^^^^^^
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/urllib3/util/ssl
.py", line 466, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/urllib3/util/ssl
.py", line 510, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/ssl.py", line 517, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/ssl.py", line 1075, in _create
self.do_handshake()
File "/usr/lib/python3.11/ssl.py", line 1346, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1002)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/urllib3/connectionpool.py", line 790, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/urllib3/connectionpool.py", line 491, in _make_request
raise new_e
urllib3.exceptions.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1002)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/urllib3/connectionpool.py", line 844, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/urllib3/util/retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='127.0.0.1', port=9090): Max retries exceeded with url: /api/conversation (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1002)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/revChatGPT/V1.py", line 1545, in main
for data in chatbot.ask(prompt=prompt, auto_continue=True):
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/revChatGPT/V1.py", line 601, in ask
yield from self.post_messages(
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/revChatGPT/V1.py", line 554, in post_messages
yield from self.__send_request(
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/revChatGPT/V1.py", line 379, in __send_request
response = self.session.post(
^^^^^^^^^^^^^^^^^^
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/requests/sessions.py", line 637, in post
return self.request("POST", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/requests/adapters.py", line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='127.0.0.1', port=9090): Max retries exceeded with url: /api/conversation (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1002)')))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/revChatGPT/V1.py", line 1584, in
main(configure())
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/revChatGPT/V1.py", line 88, in wrapper
out = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/dm/.local/share/virtualenvs/revert-chatgpt-pB6ZqeHc/lib/python3.11/site-packages/revChatGPT/V1.py", line 1569, in main
raise error from exc
revChatGPT.typings.CLIError: command line program unknown error

==============================

[dm@dm-home ChatGPT-Proxy-V4]$ ./ChatGPT-Proxy-V4
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.

  • using env: export GIN_MODE=release
  • using code: gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET /ping --> main.main.func1 (3 handlers)
[GIN-debug] PATCH /admin/puid --> main.main.func2 (4 handlers)
[GIN-debug] PATCH /admin/password --> main.main.func3 (4 handlers)
[GIN-debug] PATCH /admin/openai --> main.main.func4 (4 handlers)
[GIN-debug] GET /api/*path --> main.proxy (3 handlers)
[GIN-debug] POST /api/*path --> main.proxy (3 handlers)
[GIN-debug] PUT /api/*path --> main.proxy (3 handlers)
[GIN-debug] PATCH /api/*path --> main.proxy (3 handlers)
[GIN-debug] HEAD /api/*path --> main.proxy (3 handlers)
[GIN-debug] OPTIONS /api/*path --> main.proxy (3 handlers)
[GIN-debug] DELETE /api/*path --> main.proxy (3 handlers)
[GIN-debug] CONNECT /api/*path --> main.proxy (3 handlers)
[GIN-debug] TRACE /api/*path --> main.proxy (3 handlers)
2023/06/18 08:52:25 2006310 :9090

http, not https