uhh
All checks were successful
Galvanic Corrosion Cross-Compile / build (push) Successful in 57s

The Rewrite™️

- Discord bot removed, will return *eventually*
- Watchdog kills the server with a knife when it does not shut down in (default) 60 seconds
- New event system that works.. better.. and callbacks have types
- Removed a metric ton of circular dependencies that previously would not let the server start up
    * This included splitting up some classes
- Other. internal stuff. I forgot.
This commit is contained in:
2025-06-29 00:16:07 -04:00
parent 0ac46fcee2
commit 746c2203e5
90 changed files with 2408 additions and 1397 deletions

View File

@@ -3,7 +3,7 @@
[<-- Click to return to README.md](./README.md)
We recommend that you store the configuration file `config.json` in a safe place where Galvanic Corrosion can access it (the current directory).<br>
No other user on your server system should be able to access the file.
No other user on your host system should be able to access the configuration.
## Redis
Redis is database software and must be installed for Galvanic Corrosion.
@@ -19,26 +19,30 @@ If you are unsure of what this does, leave it unchanged.
## Network
Galvanic Corrosion listens on two ports:
* 13370/tcp(http) - for web endpoints
* 13371/tcp(http+ws) - for websockets
### Some issues may appear when connecting directly to a GC server's listening address.
Sockets behave erratically when connected directly to clients. This is a suspected issue with Deno websockets.<br>
For now, it is recommended that you use a middleman/proxy with your server. (see below)
Galvanic Corrosion listens on two ports by default:
* 13370/tcp (http)
* 13371/tcp (http+ws)
Currently, HTTPS and WSS are unsupported *directly* on GC. You can use a compatible reverse proxy solution to secure your server.<br>
[Cloudflare Tunnels](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/) (requires a domain with Cloudflare) are recommended.
Port-forward or expose your server in some way. HTTPS is **strongly** recommended for your public address.
Once your server is reachable, the nameserver (and similar functions) need to know what the public "official" address of your server is.<br>
For example, your server listens on 10.0.0.6:13370(+13371) but is tunneled to my-gc-server(-socket).coolguy.xyz:
Once your server is reachable locally, the nameserver (and similar functions) need to know what the public "official" address of your server is.<br>
For example, your server listens on 10.0.0.6:13370 and 10.0.0.6:13371, but is tunneled to my-gc-server.coolguy.xyz and my-gc-server-socket.coolguy.xyz:
- Set the "public host" for `web` and `socket` in `config.json` to the "official" address of your server
* In the example, my-gc-server.coolguy.xyz and my-gc-server-socket.coolguy.xyz
* This includes port numbers, but not the protocol
- If your public address uses HTTPS (it should for proper authentication), enable `securepublichost`
You can test your configuration by navigating to `https://your-server.coolguy.xyz/ns`.<br>
You can test your configuration by navigating to `https://my-gc-server.coolguy.xyz/ns`. (use your server host)<br>
Each field should contain your server's public address with an optional path at the end.
## Public Configuration
## Public
This section contains basic information regarding your server.
`serverName`: Somewhat invisible to players, but is an official label your server could appear as (to future server lists?)
@@ -63,8 +67,12 @@ this can be anything *except* for "none" or 4, since there is only one server to
`initialRoom`: On game startup, redirects the player to this room name instead of their DormRoom. Set to null if a "natural" startup is preferred.<br>
This room must not be private and must be matchmakeable.
## General
`watchdogTimeout`: Terminate the server process after this number of milliseconds when SIGINT is emitted.<br>
This can help when your server does not shut down gracefully.
## Logging
These three values expose booleans you can change to enable/disable logging various messages used for debugging or troubleshooting purposes.
These three booleans enable/disable logging various messages used for debugging or troubleshooting purposes.
## Discord
Can be `null`. Currently unused.
@@ -77,6 +85,8 @@ Parameters used by the server's authentication mechanisms.
`secret`: Used to generate tokens. Should never be shared (the entire file) and can be a string of characters containing no words or patterns.
<br>Use secure cryptography APIs in programming languages to generate random strings.
`console`: Key used to connect to the server console. Must be different than your `auth.secret`.
`timeout`: The maximum age for a token.
`steamkey`: When not `null`, checks the Steam authentication ticket given by the client with the Steam User Auth API. Recommended for public servers.