django-revproxy
django-revproxy copied to clipboard
Websocket Proxying Support (Django Channels)
Would be fantastic if WS proxying was supported, as many Django users have been moving to ASGI webservers.
See asgiproxy
for inspiration.
I'm having a difficult time trying to adapt RevProxy to async. My architecture has Django as the entrypoint into my services to leverage Django's auth and security practices. I proxy my requests to the various services and I am unable to use async and deferments of underlying services because of this. In essence I have created my own GIL :(
My approach has been trying to replace urlib3 with httpx but I get hung up with streaming responses. It would be wonderful if someone more knowledgeable could create working PR!
Seems like two people accomplished this with minimal LOCS:
- https://github.com/django/channels/discussions/1755#discussioncomment-6360755
- https://gist.github.com/brianglass/e3184341afe63ed348144753ee62dce5
Here's a non-django ASGI generic of websocket reverse proxies: https://github.com/valohai/asgiproxy
Is there a way we can fundraise through @jazzband to get some help here?! Thanks!