nfriedly / node-unblocker

Web proxy for evading internet censorship, and general-purpose Node.js library for proxying and rewriting remote webpages
https://www.npmjs.com/package/unblocker
GNU Affero General Public License v3.0
461 stars 935 forks source link

surviv.io websocket connection #118

Closed humphreygaming closed 3 years ago

humphreygaming commented 5 years ago

Either because of cookies or because of the way that the HTTP requests on this thing works, teams can not be created when the request "surviv.io/team" is sent. Returns with "ws://{examplehost}/team failed: Error during WebSocket handshake: Unexpected response code: 404".

From what i understand, it deletes the current proxy site (example: http://{examplehost}/proxy/http://surviv.io/} and replaces it with the hosting site URL only (example: http://{examplehost}.com), thus, making it a blank statement, trying to get a /team response only for it not to exist.

If there is any way to solve this, please provide an explanation. Thank you.

[How to Replicate: Go to any node unblocker host and type in "surviv.io". Once loaded (you can also open the console to view the log), click on "Create Team". It will say "Failed to create team" and will return the error code listed above.]

nfriedly commented 5 years ago

Aah, yes, websockets are not currently supported. I don't think they even existed when I first made this.

That'd be a good thing to add, although it won't be easy.

noahcoetsee commented 5 years ago

What a gamer. Playing Surviv on a proxy. You're making you're country proud 😛

Edit:Grammar sucks

surviv-ioio commented 5 years ago

I always play surviv on a proxy.

noahcoetsee commented 5 years ago

Is it because your school blocks it, or what?

roadkillsanta commented 5 years ago

This is an issue with the specific code in the javascript app file for surviv.io. I have looked at it on my own (because I want to play at school too) and it is just a simple 302 redirect for the websocket request (just like the current automatic redirect for the surviv.io api). Also, @nfriedly needs to add websocket support for it to work.

ghost commented 4 years ago

They block surviv.io at school as well as yohoho.io but Soon enough node unblocker sites are gonna be blocked too

nfriedly commented 3 years ago

BTW, I finally finished cleaning up the WebSockets code and merged it into master. If you deploy the master branch of nodeunblocker.com it will include WebSocket support as well as some other improvements.