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
Cloudflare blocking Websockets - "Failed to upgrade connection" #31
Comments
Do you have a proxy sitting in front of GoTTY, or is it raw? Just curious, since I was having this issue, as well, but fixed it with some nginx configuration settings. Of course, I was constantly experiencing the error -- it wasn't intermittent. |
Is that possible to provide the command you ran? |
I ran both Nginx is running on the machine but gotty is not getting proxied by it.
|
Thanks. Unfortunately, I have no idea about what's the cause but it's a websocket related issue. |
@yudai Ooh, I think I got the cause of this now. It's probably caused by Cloudflare. I have it only running on @ and only there it doesn't work. Tested on both Chrome and Firefox. http://92.222.74.40:8080/ OK |
https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-CloudFlare-with-websockets-
|
I tcpdumped traffic before CloudFlare and after CloudFlare. CF removes only "Upgrade: websocket", other data are unchanged. Could gotty ignore "Upgrade: websocket"? Another way to fix is use nginx proxy and add header with upgrade. Edit: use nginx doesn't resolve this. I've error: "Failed to authenticate websocket connection: websocket: close 1006 unexpected EOF". In JS, new WebSocket("wss://cloudflare/gotty/ws").onOpen is not called. |
For NGINX please see my page https://github.com/rajeget/websocket-nginx/ , it works Let me know if that works for cloudfare as well . |
Avoid HTTP 401 error on manifest.json due to CORS
Getting this error sometimes, only on Chrome. Firefox runs it well.
Client shows only a blank page.
Yesterday I had tried it out already and everything was fine.
The text was updated successfully, but these errors were encountered: