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

Websocket does not forward Ping #150

Closed
crholm opened this issue Jul 26, 2018 · 4 comments
Closed

Websocket does not forward Ping #150

crholm opened this issue Jul 26, 2018 · 4 comments

Comments

@crholm
Copy link
Contributor

crholm commented Jul 26, 2018

Hi, it seams that oxy does not forward some control messages but rather use gorilla/websocket defaults in handling message types such as Ping (code 9), Pong (code 10)

msgType, msg, err := src.ReadMessage()

Only really reads Text (code 1) or Binary (code 2)

https://github.com/gorilla/websocket/blob/master/conn.go#L944
Pings and Pongs are discarded, since gorilla uses a specific callback for this type of control messages.

Is there any particular reason for letting the proxy answer Ping/Pong messages? instead of the destination.

@HenrikHolst
Copy link

A major implication of this issue is that clients using Ping frames to determine service availability will in reality only see the proxy availability forcing services to implement protocol level ping/pong messages to handle what the ping/pong frames are designed to solve.

In other words, not forwarding these frames makes any proxy using oxy a non-transparent proxy.

@MrMarkW
Copy link

MrMarkW commented Jul 26, 2018

This issue caused us not to be able to use Traefik our web socket services.

@crholm
Copy link
Contributor Author

crholm commented Jul 26, 2018

We are facing the same thing. Wanting to use traefik, but this might be a showstopper for us as well. One can of course work around it, but it seams like it is something that really should be fixed

@crholm
Copy link
Contributor Author

crholm commented Jul 30, 2018

Closing issue since merge of pull request.

@crholm crholm closed this as completed Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants