Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy Websocket Support #361

Closed
yujinqiu opened this issue Dec 19, 2019 · 7 comments
Closed

Proxy Websocket Support #361

yujinqiu opened this issue Dec 19, 2019 · 7 comments
Labels
z-enhancement ⬆️ Product Enhancement

Comments

@yujinqiu
Copy link

It's nice to see that unit have support proxy feature.
Is there any plan to support proxy websocket protocol so I can use Unit to dynamic proxy my application.

@VBart VBart added the z-enhancement ⬆️ Product Enhancement label Dec 19, 2019
@alx696
Copy link

alx696 commented Apr 16, 2020

@VBart Why not support the standard Websocket protocol?

nginx:

  location /api-websocket {
     proxy_pass http://172.17.0.1:81/websocket;
     proxy_http_version 1.1;
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection "Upgrade";
 }

@VBart
Copy link
Contributor

VBart commented Apr 17, 2020

@VBart Why not support the standard Websocket protocol?

As the first step we need to support HTTP/1.1 for proxy. It's not supported yet, only HTTP/1.0.

@buzypi
Copy link

buzypi commented May 17, 2020

+1

Would be great to have support for both HTTP/1.1 and WebSocket proxying.

@ghost ghost added this to To Do in NGINX Unit roadmap-tracker May 18, 2020
@june07
Copy link

june07 commented Jul 13, 2020

Any update on this advancement? Nginx supports it just fine and I was under the assumption this codebase would share much from that of Nginx... Is a lot involved with making unit HTTP/1.1 compliant and thus able to proxy websockets?

@artemkonev

@VBart
Copy link
Contributor

VBart commented Jul 15, 2020

@june07 HTTP/1.1 support was introduced with 65799c7 (will be released with 1.19.0 in a few weeks or so), but without keep-alive connections cache. The next step will be to introduce keep-alive, and then we will be able to start working on WebSockets.

Unit doesn't share codebase with nginx and lot of things in Unit have been implemented differently.

@sureshjoshi
Copy link

Any updates to this one? I just ran into this and realized that I can't (I think) proxy WS connections. It might just be bad config, though.

Gemorroj added a commit to Gemorroj/nginx-unit-test that referenced this issue Nov 27, 2021
@lcrilly lcrilly closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2023
@lcrilly lcrilly removed this from Backlog in NGINX Unit roadmap-tracker Mar 27, 2023
@invisibleroads
Copy link

From what I understand then, there is currently no equivalent for the following in nginx unit?

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";

Thus far, I have really liked the design of unit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
z-enhancement ⬆️ Product Enhancement
Projects
None yet
Development

No branches or pull requests

8 participants