Code Monkey home page Code Monkey logo

jprq's Introduction

What's JPRQ?

  • JPRQ is a free and open tool for exposing local servers to public network (the internet)
  • It can expose TCP protocols, such as HTTP, SSH, etc. Any server!

How to install

Windows

📹Video tutorial

  1. Install the latest release of JPRQ

  2. Place the file where it is convenient for you

    (At this point, you can use the program, but you will need to manually call the .exe file)

  3. Create jprq.bat file so we can use the "jprq" keyword to call the .exe file

    @echo off
    "C:\Exact\Path\To\File\jprq-windows-386.exe" %*
  4. Awesome! Finally, we need to add to the environment variable " PATH", the path to the folder where we created .bat file (step 3)

Congratulations! You can check if everything is working with the jprq command in CMD


MacOs and Linux
$ brew install jprq

or

$ curl -fsSL https://jprq.io/install.sh | sudo bash

Arch-based distros

  1. JPRQ is available on the AUR.

    git clone https://aur.archlinux.org/jprq.git
    cd jprq
    makepkg -si
  2. You can use an AUR helper like yay to install it:

    yay -S jprq

How to use

First obtain auth token from https://jprq.io/auth, then

jprq auth <your-auth-token>

Replace 8000 with the port you want to expose

jprq http 8000

For exposing any TCP servers, such as SSH

jprq tcp 22

For using custom subdomains

jprq http 3000 -s <custom-name>

For using jprq debugger (with v2.1 or higher)

jprq http 3000 --debug

Serve static files using built-in HTTP Server (with v2.2 or higher)

jprq serve .

Serve on a different domain using CNAME (with v2.3 or higher)

jprq http 3000 --cname example.com

Press Ctrl+C to stop it

Update as of Oct 21, 2023

** jprq is now members-only service **

What does that mean?

  • it still stays open and free to self-host
  • to use the service I maintain, buy me a coffee and leave your github username
  • I will send you invite link to keep using jprq

Buy Me A Coffee

jprq's People

Contributors

aslon1213 avatar azimjohn avatar bek-shoyatbek avatar coderuz avatar davronkhamdamov avatar deepsource-autofix[bot] avatar dependabot[bot] avatar diyorbekazimqulov avatar henrybear327 avatar jasurb3k-coding avatar mmkamron avatar mmnvb avatar murtazokhongofurov avatar sylrelo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jprq's Issues

TCP

Can i use this to open TCP and not HTTP?

TimeOut Error [Connect call failed ]

Hi
I was testing the package for 2 days and it was working fine, but today I'm getting this error when I try to start the service :

Traceback (most recent call last): File "/usr/local/bin/jprq", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.7/site-packages/jprq/main.py", line 28, in main http_uri=f'http://127.0.0.1:{args.port}', File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 583, in run_until_complete return future.result() File "/usr/local/lib/python3.7/site-packages/jprq/tunnel.py", line 16, in open_tunnel async with websockets.connect(ws_uri, ssl=ssl_context) as websocket: File "/usr/local/lib/python3.7/site-packages/websockets/client.py", line 517, in __aenter__ return await self File "/usr/local/lib/python3.7/site-packages/websockets/client.py", line 535, in __await_impl__ transport, protocol = await self._create_connection() File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 958, in create_connection raise exceptions[0] File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 945, in create_connection await self.sock_connect(sock, address) File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/selector_events.py", line 473, in sock_connect return await fut File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/selector_events.py", line 503, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') TimeoutError: [Errno 60] Connect call failed ('64.227.113.14', 443)

What does "Doesn't work with HTTP Polling" mean exactly?

Say I've got a webpage that does polling like so:

    function refresh() {
        $.get( "api/", function(data) {$("#chat").val(data);});
        setTimeout(refresh, 5000);
    }
    refresh();

This wouldn't work? How come? And would there be a way to enable this? As I see it, it's just a regular HTTP request just fired periodically.

Is JPRQ down?

Hello,

I could not connect to jprq today. From CMD I see:

$ jprq 8000
Online at https://amine.jprq.live/

In the browser, I see the spinner in the tab and the page remains blank.

I am not sure whether something is wrong at my side or at the server side.

Is there some argument I can pass to jprq to see whether things are fine at the server side?

Thanks.

How to Install on Windows?

Hey, yesterday I found this project and I wanted to install this on my computer which is Windows 10, but can't and was getting build errors, even when I install Visual C++ tools? Can anyone tell me how to install this on Windows? This is what I got as an error->

  ERROR: Command errored out with exit status 1:
   command: 'e:\python_important\python.exe' 'e:\python_important\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\HP\AppData\Local\Temp\tmpodhipo3z'
       cwd: C:\Users\HP\AppData\Local\Temp\pip-install-l7lksmk7\multidict_419d5fdeacfd40ab9f1244168d03a4b2
  Complete output (40 lines):
  **********************
  * Accellerated build *
  **********************
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\multidict
  copying multidict\_abc.py -> build\lib.win-amd64-3.9\multidict
  copying multidict\_compat.py -> build\lib.win-amd64-3.9\multidict
  copying multidict\_multidict_base.py -> build\lib.win-amd64-3.9\multidict
  copying multidict\_multidict_py.py -> build\lib.win-amd64-3.9\multidict
  copying multidict\__init__.py -> build\lib.win-amd64-3.9\multidict
  running egg_info
  writing multidict.egg-info\PKG-INFO
  writing dependency_links to multidict.egg-info\dependency_links.txt
  writing top-level names to multidict.egg-info\top_level.txt
  reading manifest file 'multidict.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*.pyc' found anywhere in distribution
  warning: no previously-included files found matching 'multidict\_multidict.html'
  warning: no previously-included files found matching 'multidict\*.so'
  warning: no previously-included files found matching 'multidict\*.pyd'
  warning: no previously-included files found matching 'multidict\*.pyd'
  no previously-included directories found matching 'docs\_build'
  writing manifest file 'multidict.egg-info\SOURCES.txt'
  copying multidict\__init__.pyi -> build\lib.win-amd64-3.9\multidict
  copying multidict\_multidict.c -> build\lib.win-amd64-3.9\multidict
  copying multidict\py.typed -> build\lib.win-amd64-3.9\multidict
  creating build\lib.win-amd64-3.9\multidict\_multilib
  copying multidict\_multilib\defs.h -> build\lib.win-amd64-3.9\multidict\_multilib
  copying multidict\_multilib\dict.h -> build\lib.win-amd64-3.9\multidict\_multilib
  copying multidict\_multilib\istr.h -> build\lib.win-amd64-3.9\multidict\_multilib
  copying multidict\_multilib\iter.h -> build\lib.win-amd64-3.9\multidict\_multilib
  copying multidict\_multilib\pair_list.h -> build\lib.win-amd64-3.9\multidict\_multilib
  copying multidict\_multilib\views.h -> build\lib.win-amd64-3.9\multidict\_multilib
  running build_ext
  building 'multidict._multidict' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for multidict
Failed to build multidict
ERROR: Could not build wheels for multidict which use PEP 517 and cannot be installed directly

Problems with installing on linux

I am trying to install jprq on my linux laptop, but I get an error every time.
Does anyone know how to fix this?
I don't have root access, so I can't install stuff globally...
when I run pip install jprq --user I get this where it mentions an error:

Installing collected packages: certifi, yarl, aiohttp, jprq
Running setup.py install for yarl ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-f7o0usle/yarl/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-j6km_mll/install-record.txt --single-version-externally-managed --compile --user --prefix=:
**********************
* Accellerated build *
**********************
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/yarl
copying yarl/init.py -> build/lib.linux-x86_64-3.6/yarl
copying yarl/_quoting.py -> build/lib.linux-x86_64-3.6/yarl
copying yarl/_quoting_py.py -> build/lib.linux-x86_64-3.6/yarl
copying yarl/_url.py -> build/lib.linux-x86_64-3.6/yarl
running egg_info
writing yarl.egg-info/PKG-INFO
writing dependency_links to yarl.egg-info/dependency_links.txt
writing requirements to yarl.egg-info/requires.txt
writing top-level names to yarl.egg-info/top_level.txt
reading manifest file 'yarl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '
.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl/.html'
warning: no previously-included files found matching 'yarl/
.so'
warning: no previously-included files found matching 'yarl/*.pyd'
no previously-included directories found matching 'docs/_build'
writing manifest file 'yarl.egg-info/SOURCES.txt'
copying yarl/init.pyi -> build/lib.linux-x86_64-3.6/yarl
copying yarl/_quoting_c.c -> build/lib.linux-x86_64-3.6/yarl
copying yarl/_quoting_c.pyi -> build/lib.linux-x86_64-3.6/yarl
copying yarl/_quoting_c.pyx -> build/lib.linux-x86_64-3.6/yarl
copying yarl/py.typed -> build/lib.linux-x86_64-3.6/yarl
running build_ext
building 'yarl._quoting_c' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/yarl
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fPIC -I/usr/include/python3.6m -c yarl/_quoting_c.c -o build/temp.linux-x86_64-3.6/yarl/_quoting_c.o
yarl/_quoting_c.c:4:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-f7o0usle/yarl/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-j6km_mll/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-f7o0usle/yarl/
You are using pip version 10.0.1, however version 20.3.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

can you provide binary version ?

can you provide binary version for arm ? i am getting trouble when installing this in arm board with old linux version, python version just too old to install this jprq, i hope u can provide executable version to run in arm device

Content Encoding Error

I was able to install and run jprq to my localhost port 8080 but when navigating to the generated URL, I get Content Encoding Error on all devices.

In my local dev console:

> jprq 8080
Online at https://imaginative-abdul.jprq.live/
GET / 200
GET / 200
GET / 200
GET / 304
GET / 200
GET / 200

Separate console for running the app:

    App URL........... http://localhost:8080
    Dev mode.......... spa
    Pkg quasar........ v1.12.13
    Pkg @quasar/app... v2.0.6
    Transpiled JS..... yes (Babel)

i 「wds」: Project is running at http://0.0.0.0:8080/
i 「wds」: webpack output is served from
 App · Opening default browser at http://localhost:8080

Tried on Chrome, Firefox and Edge browsers on local machine with the same Content Encoding Error message.

Tried on Firefox on Android phone (outside of the local machine network), same Content Encoding Error message.

Localhost:8080 can be seen with no issue.

image

Missing files in sdist

It appears that the manifest is missing at least one file necessary to build
from the sdist for version 1.0.4. You're in good company, about 5% of other
projects updated in the last year are also missing files.

+ /tmp/venv/bin/pip3 wheel --no-binary jprq -w /tmp/ext jprq==1.0.4
Looking in indexes: http://10.10.0.139:9191/root/pypi/+simple/
Collecting jprq==1.0.4
  Downloading http://10.10.0.139:9191/root/pypi/%2Bf/0a5/53b23eb1610f6/jprq-1.0.4.tar.gz (2.7 kB)
    ERROR: Command errored out with exit status 1:
     command: /tmp/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-ballp9j7/jprq/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-ballp9j7/jprq/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-wheel-ballp9j7/jprq/pip-egg-info
         cwd: /tmp/pip-wheel-ballp9j7/jprq/
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-wheel-ballp9j7/jprq/setup.py", line 57, in <module>
        install_requires=read_requirements('requirements.txt'),
      File "/tmp/pip-wheel-ballp9j7/jprq/setup.py", line 19, in read_requirements
        contents = read_file(filename).strip('\n')
      File "/tmp/pip-wheel-ballp9j7/jprq/setup.py", line 14, in read_file
        with open(path_in_project(filename)) as f:
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-wheel-ballp9j7/jprq/requirements.txt'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Error in connecting to jprq

getting this error when trying to run JPRQ can you please look into it: websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 502

error

nohup: ignoring input
Online at https://conpedrinha.jprq.live/
POST /slack/documentos 200
POST /slack/documento_assinado 200
POST /slack/documento_assinado 200
POST /slack/documento_assinado 200
POST /slack/documento_assinado 200
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/protocol.py", line 827, in transfer_data
message = await self.read_message()
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame
frame = await self.read_frame(max_size)
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame
frame = await Frame.read(
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read
data = await reader(2)
File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
await self._wait_for_data('readexactly')
File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
asyncio.exceptions.CancelledError

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

Traceback (most recent call last):
File "/home/ubuntu/.local/bin/jprq", line 8, in
sys.exit(main())
File "/home/ubuntu/.local/lib/python3.8/site-packages/jprq/main.py", line 29, in main
loop.run_until_complete(
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/ubuntu/.local/lib/python3.8/site-packages/jprq/tunnel.py", line 22, in open_tunnel
message = json.loads(await websocket.recv())
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/protocol.py", line 509, in recv
await self.ensure_open()
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/protocol.py", line 812, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason

Online at https://conpecone.jprq.live/
POST /slack/disponibilidade 200
POST /slack/actions 200
POST /slack/actions 200
POST /slack/actions 200
POST /slack/actions 200
POST /slack/actions 200
POST /slack/actions 200
POST /slack/actions 200
POST /slack/actions 200
POST /slack/actions 200
POST /slack/actions 200
POST /slack/actions 200
POST /slack/actions 200
POST /slack/actions 200
POST /slack/actions 200
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/protocol.py", line 827, in transfer_data
message = await self.read_message()
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame
frame = await self.read_frame(max_size)
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame
frame = await Frame.read(
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read
data = await reader(2)
File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
await self._wait_for_data('readexactly')
File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
asyncio.exceptions.CancelledError

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

Traceback (most recent call last):
File "/home/ubuntu/.local/bin/jprq", line 8, in
sys.exit(main())
File "/home/ubuntu/.local/lib/python3.8/site-packages/jprq/main.py", line 29, in main
loop.run_until_complete(
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/ubuntu/.local/lib/python3.8/site-packages/jprq/tunnel.py", line 22, in open_tunnel
message = json.loads(await websocket.recv())
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/protocol.py", line 509, in recv
await self.ensure_open()
File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/protocol.py", line 812, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason

view requests and reponse

Hi,

First of all thank you for your awesome contribution, your work is really great, a best alternative for ngrok, i wanted to know where can i view the requests and response going in the process. is there a way to check these like in ngrok or is there a log file or something where i can check for it.

thanks.

error after trying to refresh the page

C:\Users\Asus>jprq 8000 -s=tes
Online at https://tes.jprq.live/
GET / 200
GET / 200
GET /robots.txt 404
GET /robots.txt 404
GET /robots.txt 404
GET / 200
GET / 304
GET / 304
GET / 304
GET / 304
GET / 304
Traceback (most recent call last):
File "c:\users\asus\appdata\local\programs\python\python39\lib\site-packages\websockets\protocol.py", line 827, in transfer_data
message = await self.read_message()
File "c:\users\asus\appdata\local\programs\python\python39\lib\site-packages\websockets\protocol.py", line 895, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "c:\users\asus\appdata\local\programs\python\python39\lib\site-packages\websockets\protocol.py", line 971, in read_data_frame
frame = await self.read_frame(max_size)
File "c:\users\asus\appdata\local\programs\python\python39\lib\site-packages\websockets\protocol.py", line 1047, in read_frame
frame = await Frame.read(
File "c:\users\asus\appdata\local\programs\python\python39\lib\site-packages\websockets\framing.py", line 105, in read
data = await reader(2)
File "c:\users\asus\appdata\local\programs\python\python39\lib\asyncio\streams.py", line 723, in readexactly
await self._wait_for_data('readexactly')
File "c:\users\asus\appdata\local\programs\python\python39\lib\asyncio\streams.py", line 517, in _wait_for_data
await self._waiter
asyncio.exceptions.CancelledError

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

Traceback (most recent call last):
File "C:\Users\Asus\AppData\Local\Programs\Python\Python39\Scripts\jprq-script.py", line 33, in
sys.exit(load_entry_point('jprq==1.3.0', 'console_scripts', 'jprq')())
File "c:\users\asus\appdata\local\programs\python\python39\lib\site-packages\jprq\main.py", line 29, in main
loop.run_until_complete(
File "c:\users\asus\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "c:\users\asus\appdata\local\programs\python\python39\lib\site-packages\jprq\tunnel.py", line 22, in open_tunnel
message = json.loads(await websocket.recv())
File "c:\users\asus\appdata\local\programs\python\python39\lib\site-packages\websockets\protocol.py", line 509, in recv
await self.ensure_open()
File "c:\users\asus\appdata\local\programs\python\python39\lib\site-packages\websockets\protocol.py", line 812, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason

Get url

Hi I would like to access the urls from a program. For example a local server that will allow me to access the urls and the shared ports in json. so I can use them in my program. Thank you.

Getting the IP

Is there a way to somehow get an actual numeric IP of where my tunnel is rather than a URL?
The reason for that is I'm trying to use it to tunnel ports for quick multiplayer games and some games don't support the entry of URL in their direct IP connection feature.
Thanks in advance.

[QUESTION] Showing IP address of clients

Can I make the console show the IP address of everyone who is connecting to my http server? If yes then how so? I am making a login system for a chatroom and I want to prevent multiple people from the same IP address connecting

[ERROR] TypeError: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary

~ $ jprq http 5050 -s=msr8

jprq : 2.0.1                                        Press Ctrl+C to quit.

Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/bin/jprq", line 33, in <module>
    sys.exit(load_entry_point('jprq==2.0.1', 'console_scripts', 'jprq')())
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/click/core.py", line 1128, in _call_
    return self.main(*args, **kwargs)
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/jprq/main.py", line 30, in http
    loop.run_until_complete(
  File "/data/data/com.termux/files/usr/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/jprq/tunnel_http.py", line 16, in open_http_tunnel
    async with websockets.connect(ws_uri, ssl=ssl_context) as websocket:
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/websockets/legacy/client.py", line 604, in _aenter_
    return await self
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/websockets/legacy/client.py", line 622, in _await_impl_
    transport, protocol = await self._create_connection()
  File "/data/data/com.termux/files/usr/lib/python3.10/asyncio/base_events.py", line 1080, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/data/data/com.termux/files/usr/lib/python3.10/asyncio/base_events.py", line 1098, in _create_connection_transport
    protocol = protocol_factory()
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/websockets/legacy/client.py", line 160, in _init_
    super()._init_(**kwargs)
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 154, in _init_
    self._drain_lock = asyncio.Lock(
  File "/data/data/com.termux/files/usr/lib/python3.10/asyncio/locks.py", line 77, in _init_
    super()._init_(loop=loop)
  File "/data/data/com.termux/files/usr/lib/python3.10/asyncio/mixins.py", line 17, in _init_
    raise TypeError(
TypeError: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary
~ $

ADDITIONAL INFO

Python Version: 3.10.0
Termux Version: 0.117
OS: Android 9
Model: Redmi Note 6 Pro

Error Connecting to jprq

Hello,

The certificate seems to be expired so jprq is giving error when trying to connect to it.
websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 502
Can you please look into it.

Appreciate your help.

How do I host a socket application through it?

So suppose I host a python server through the socket module at port 1289 on my localhost, and I expose that port through jprq at abc.jprq.live by typing jprq -s abc 1289 in the terminal (I am using macOS) . Now what do I make my client connect to so that it can transfer data through this socket?

Is it down?

websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 504

I can't connect anymore. Please confirm.

how to avoid this??

i want avoid this patient-crazytts.jprq.live

i want it to crazytts.jprq.live/ without patient-crazytts.jprq.live because is kinda extremely embarrasing for me

Lacks a good README!

First, thanks a lot for this project. It will help a lot of people, including myself! I was thinking, maybe add a proper README? It is really needed, as there is no way to understand how this works without looking at the code!

Self host server

Hi there,

I'm currently having a look at your solution.
Seems to be a great alternative to localtunnel or ngrok.

I'm missing any info/steps how to actually deploy self hosted service?

I do have a devops skills, I'd like to run it later on as a docker container (can share files with you), but first I need to understand how to deploy and use it as self hosted solution.

Thank you!

Lacks a license too

Hey there! Don't forget to add a license to your project! Else, everyone can do whatever they want with it!
Have a good day!

Please add more informatoin about the JPRQ server

This looks like a very interesting project and currently, we pay money to use Ngrok. That being said I would like to know more about the JPRQ server, like:

  • Who and what people are behind the server? Why should I trust it?
  • Who is paying for the server?
  • What is the plan to continue to fund this project?

This would be helpful information to add to the README.md.

Throwing 504 Gateway Time-out when hosted from cloud provider (gcp)

I tried locally. It works like a charm. Thanks for this.
But if i deploy on cloud instance it throws error 504 Gateway Time-out
and on console below error:

user-1@instance-1:~$ jprq 3333
Online at https://user-1.jprq.live/
Error Processing Request At: /
Error Processing Request At: /

I understand jprq is to get localhost online but just trying to understand why this error when hosted from gcp instance. I have 80 tcp port whitelisted and running as root as well. Can you please help ?

SSL fail, cannot establish connection

File "/root/miniconda3/envs/myconda/bin/jprq", line 8, in
sys.exit(main())
File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/jprq/main.py", line 32, in main
http_uri=f'http://127.0.0.1:{args.port}',
File "/root/miniconda3/envs/myconda/lib/python3.7/asyncio/base_events.py", line 583, in run_until_complete
return future.result()
File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/jprq/tunnel.py", line 15, in open_tunnel
async with websockets.connect(ws_uri, ssl=ssl_context) as websocket:
File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/websockets/client.py", line 517, in aenter
return await self
File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/websockets/client.py", line 535, in await_impl
transport, protocol = await self._create_connection()
File "/root/miniconda3/envs/myconda/lib/python3.7/asyncio/base_events.py", line 985, in create_connection
ssl_handshake_timeout=ssl_handshake_timeout)
File "/root/miniconda3/envs/myconda/lib/python3.7/asyncio/base_events.py", line 1013, in _create_connection_transport
await waiter
File "/root/miniconda3/envs/myconda/lib/python3.7/asyncio/sslproto.py", line 530, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/root/miniconda3/envs/myconda/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "/root/miniconda3/envs/myconda/lib/python3.7/ssl.py", line 774, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1076)

Deceptive Site

Google has identified jprq.io as a deceptive site and it doesn't open in major browsers.

And DNS stopped working for jprq.io too, so it won't be able to accept webhook requests either.
I have submitted it for a review in the google search console, it will take a few days to get back online.

I am trying to find ways how others to cope with this issue, found about Public Suffix Domains list. I will submit jprq.io to it as soon as DNS block gets lifted.

Screen Shot 2021-03-31 at 17 57 26

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1123)

While running the service for the first time, I got this error.

Full Error:

Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/jprq", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/.local/lib/python3.8/site-packages/jprq/main.py", line 17, in main
    loop.run_until_complete(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/jprq/tunnel.py", line 16, in open_tunnel
    async with websockets.connect(ws_uri, ssl=ssl_context) as websocket:
  File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/client.py", line 517, in __aenter__
    return await self
  File "/home/ubuntu/.local/lib/python3.8/site-packages/websockets/client.py", line 535, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1050, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1080, in _create_connection_transport
    await waiter
  File "/usr/lib/python3.8/asyncio/sslproto.py", line 529, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/lib/python3.8/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.8/ssl.py", line 944, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1123)```

CORS issue

Hey! I'm trying to make a POST request with type Multipart/formData from the browser and getting the following CORS error:

Access to XMLHttpRequest at 'https://MY_URL.jprq.live/' from origin 'https://my.domain' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Is there any way around it?

jprq cannot connect with 504 error

Hi, the server has been quite stable in the past few weeks, thanks for your effort!
Today the 504 error is coming back, can you take a look?

Not an issue more like discussion!

How are you hosting jprq.io? What I mean to say is details of jprq.io hosting provider.

P.S. I know it's the question to put in jprq.io but I don't understand golang fully so asking here.

NPM module?

Can you guys make this into a proper npm module so I can use it with my app and add it so you can write code to run it and not just a cli or GUI. Thanks!

SSL: CERTIFICATE_VERIFY_FAILED

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.
c:1076)

help me pls

jprq Connect call fails with 504

jprq 8000 cannot connect to jprq server, it was working for me a few hours ago

File "/root/miniconda3/envs/myconda/bin/jprq", line 8, in
sys.exit(main())
File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/jprq/main.py", line 32, in main
http_uri=f'http://127.0.0.1:{args.port}',
File "/root/miniconda3/envs/myconda/lib/python3.7/asyncio/base_events.py", line 583, in run_until_complete
return future.result()
File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/jprq/tunnel.py", line 15, in open_tunnel
async with websockets.connect(ws_uri, ssl=ssl_context) as websocket:
File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/websockets/client.py", line 517, in aenter
return await self
File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/websockets/client.py", line 547, in await_impl
extra_headers=protocol.extra_headers,
File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/websockets/client.py", line 296, in handshake
raise InvalidStatusCode(status_code)
websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 504

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.