abhinavsingh / proxy.py

💫 Ngrok FRP Alternative • ⚡ Fast • 🪶 Lightweight • 0️⃣ Dependency • 🔌 Pluggable • 😈 TLS interception • 🔒 DNS-over-HTTPS • 🔥 Poor Man's VPN • ⏪ Reverse & ⏩ Forward • 👮🏿 "Proxy Server" framework • 🌐 "Web Server" framework • ➵ ➶ ➷ ➠ "PubSub" framework • 👷 "Work" acceptor & executor framework

Home Page:https://abhinavsingh.com/proxy-py-a-lightweight-single-file-http-proxy-server-in-python/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reverse proxy plugin to support WebSockets

thatsheepishcoder opened this issue · comments

Is your feature request related to a problem? Please describe.

Currently, the reverse proxy plugin setup doesn't support proxying over websocket connections. This means proxy.py is unsuitable for applications that require websocket and http functionality (for example, JupyterLab).

Describe the solution you'd like

Inbuilt support for websocket connections through the reverse-proxy plugin.

Additional context

The current implementation will result in websocket connections being handled by the web server plugin, rather than passing the connection through to the Reverse Proxy plugin. If you spin up a reverse-proxy plugin and then attempt to pass a websocket connection, you will see mentions of the webserver handling the connection in the proxy.py logging.

Initially, it looks like it needs to be added as a valid route in ReverseProxy class (proxy.http.server.reverse, line 53-54), however the class also does not have implemented functionality for websocket upstream passing.

@thatsheepishcoder Thanks for raising this. I have been trying to pull in full proxy-server style support within reverse-proxy chain. This will likely land in the next release.

Just checking in on this actually, ran into the same limitation?