azimjohn / jprq

join public router. quickly.
https://jprq.io
968 stars 143 forks source link

Error showing when trying to connect to jprq! #75

Closed parasarora15 closed 2 years ago

parasarora15 commented 2 years ago

When I try to run jprq http tunnel command following error is generated:

raise InvalidStatusCode(status_code) websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 403

Seems like certificate is expired can you please check this?

Thanks, Paras

azimjohn commented 2 years ago

Thank you for reporting this issue. I checked SSL certificates and they are valid for another month.

I am guessing, this was due to increased load on the server. I am thinking of increasing hardware resources and adding a rate-limiter per tunnel in the upcoming versions to avoid such problems in the future.

parasarora15 commented 2 years ago

The problem continues not able to connect to jprq http tunnel at all! same error is there. raise InvalidStatusCode(status_code) websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 403

Can you please help :) image

azimjohn commented 2 years ago

I have found the cause of the issue. This is due to the origin check and it's returning an HTTP 403 error.

The issue: https://github.com/golang/go/issues/23251

I am going to try the suggested solution and let you know to see if it helps.

parasarora15 commented 2 years ago

Still not working tried it on Linux as well issue still not resolved... image

parasarora15 commented 2 years ago

error showing on Linux

Traceback (most recent call last): File "/srv/jp_env/bin/jprq", line 11, in load_entry_point('jprq==2.1.0', 'console_scripts', 'jprq')() File "/srv/jp_env/lib64/python3.6/site-packages/click/core.py", line 1128, in call return self.main(args, kwargs) File "/srv/jp_env/lib64/python3.6/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/srv/jp_env/lib64/python3.6/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/srv/jp_env/lib64/python3.6/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, ctx.params) File "/srv/jp_env/lib64/python3.6/site-packages/click/core.py", line 754, in invoke return __callback(args, *kwargs) File "/srv/jp_env/lib64/python3.6/site-packages/jprq/main.py", line 45, in http http_uri=f'http://127.0.0.1:{port}', File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete return future.result() File "/srv/jp_env/lib64/python3.6/site-packages/jprq/tunnel_http.py", line 16, in open_http_tunnel async with websockets.connect(ws_uri, ssl=ssl_context) as websocket: File "/srv/jp_env/lib64/python3.6/site-packages/websockets/legacy/client.py", line 604, in aenter return await self File "/srv/jp_env/lib64/python3.6/site-packages/websockets/legacy/client.py", line 622, in __await_impl__ transport, protocol = await self._create_connection() File "/usr/lib64/python3.6/asyncio/base_events.py", line 750, in create_connection infos = f1.result() File "/usr/lib64/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(self.args, **self.kwargs) File "/usr/lib64/python3.6/socket.py", line 745, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

azimjohn commented 2 years ago

The error on Linux seems to be a DNS error, it couldn't even reach the server. I am guessing JPRQ could be blocked by your firewall, internet provider?

Regarding the HTTP 403 error on Windows, I will try to replicate it on my side and try to come up with something. Until then, can you give the client binaries a try? Maybe it'll solve the issue on Windows.

jprq-windows-amd64.exe jprq-windows-386.exe

parasarora15 commented 2 years ago

Binaries also not working on my PC can there be a firewall issue on Windows side too? getting following error:

jprq-windows-amd64 http 5000 Error Connecting to open.jprq.io: websocket: bad handshake

also tried "ping open.jprq.io" on Linux it is showing as :Name or service not known if that could be a reason for not connecting to tunnel

azimjohn commented 2 years ago

I started to believe it to be a firewall issue or a block from the internet provider side. I am closing this issue for now. Let me know if anything new comes up.

dronov-dmitry commented 1 year ago

I started to believe it to be a firewall issue or a block from the internet provider side. I am closing this issue for now. Let me know if anything new comes up.

have the same problem sudo ufw disable - not help