pretty66 / websocketproxy

🔥🔥🔥Go websocket proxy, a simple websocket reverse proxy implementation, supports ws, wss
Apache License 2.0
71 stars 21 forks source link

Firefox Headers #7

Open fvrrvg opened 6 months ago

fvrrvg commented 6 months ago

Hi there!

First off, thank you so much for your work here! I'm glad I was able to find it when I needed exactly what the package offers.

While building a project using it, I came across this behavior where Firefox isn't working as expected, while all Chromium-based browsers just work fine. After debugging, I realized that the issue lies in the function Proxy, as it expects the header 'Connection' to be 'Upgrade'. However, with Firefox, when connecting to a websocket, it uses the header 'keep-alive, Upgrade' instead, and that's what was causing the issue and kept returning without giving any errors.

I'd be more than happy to make a PR if you're okay with that. Just let me know!

pretty66 commented 2 months ago

Sorry, I just saw this question now; if it is convenient for you, you can submit a PR and I will deal with it as soon as possible.