m-byte918 / MultiOgarII

A continued version of the original MultiOgar, an open source Ogar server implementation written with Node.js.
Apache License 2.0
126 stars 131 forks source link

Add Support For Secure Websocket #1542

Closed ZandercraftGames closed 2 years ago

ZandercraftGames commented 4 years ago

Secure Websocket Support

Why is it needed?

Any client running on https (SSL), will not be able to connect to the MultiOgarII instance unless it runs over the wss:// protocol. This was originally in the gameserver.js file before changes were made to its name and were there since it's implementation in the original MultiOgar fork by Barbosik.

What happened to it?

It was originally committed here: https://github.com/Barbosik/MultiOgar/commit/cf1c5dd1fe5024060df49e38b9447ce7105895a1 After that, I'm not sure when or why support was removed from your fork.

What exactly is the error with connection?

As seen in the Javascript Developer Console on the website:

main_out.js:326 WebSocket connection to 'wss://<REDACTED>:441/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
Borys64 commented 4 years ago

It was removed to decrease the size of the repository, however I'll re-implement it.

Knyxishere commented 4 years ago

Any update? I'm using a letsencrypt cert and still not working, same with cloudflare.

Knyxishere commented 4 years ago

I forgot: WebSocket connection to 'wss://127.0.0.1:myport/' failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR that's the error chrome console throw.

M1stHub commented 3 years ago

It was removed to decrease the size of the repository, however I'll re-implement it.

how to make it work

Borys64 commented 3 years ago

Sorry I don't have enough time at the moment due to college, I'll try it next week.

Borys64 commented 3 years ago

Added TLS support, you should now be able to use HTTPS. For instructions on how to do so, please take a look at the README.

I will leave this issue open just in case any vulnerabilities are found.

Borys64 commented 3 years ago

@ZandercraftGames @Knyxishere @EzSnipes26 - Please ensure your local repo matches the public one. You can do this with git pull.

M1stHub commented 3 years ago

i have it updated and i use cloudflare for certification and key and i have them in the keys folder and it logs using https:// use the wss:// protocol while connecting but it dosent work still