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

Node.js support version #1549

Closed LaiYueTing closed 3 years ago

LaiYueTing commented 3 years ago

Which version of Node.js will be more stable?

There was a problem with install modules:


npm WARN ws@7.3.1 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.3.1 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

added 1 package in 0.781s```
Borys64 commented 3 years ago

I personally use v13.2.0 and find no issues. However it looks like you can simply fix this issue with:

npm install bufferutil utf-8-validate
LaiYueTing commented 3 years ago

install modules resolved

But when using TLS, Cigar2 cannot successfully enter the game ...

Server :
[Info] 418 bad words loaded
[Info] 3 user records loaded.
[Info] 0 IP ban records loaded.
[Info] Using HTTPS, use the wss:// protocol prefix when connecting
[Info] WebSocket: ws
[Info] Running MultiOgarII 1.6.2, a FOSS agar.io server implementation.
(node:8908) Warning: N-API is an experimental feature and could change at any time.
[Info] Started stats server on port 88
[Info] Game server started, on port 777
[Info] Current game mode is Free For All

Chrome Console :
WebSocket connection to 'wss://anonymous:777/' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
_0x2573x39 @ main_out.js:1
(anonymous) @ main_out.js:1
Borys64 commented 3 years ago

The browser can't verify the validity of your SSL certificate. I've found an article here that discusses the issue. Please take a look at it and see if that resolves your issue.

LaiYueTing commented 3 years ago

Use OpenSSL self-signed certificate, link Cloudflare CDN

Borys64 commented 3 years ago

You need to add the certificate authority to your browser's whitelist.

LaiYueTing commented 3 years ago

I use the https://www.sslforfree.com/ certificate, and the browser has successfully verified SSL, but the game still cannot connect. Can I contact Discord?

Borys64 commented 3 years ago

Sorry for the late reply, I'm not so sure what the issue might be. However, when tested locally, the SSL seems to work fine. Could you elaborate on how you're connecting to the server?

Tombez commented 3 years ago

@LaiYueTing The problem you originally had was due to not having the latest stable release of NodeJS.