diff --git a/CONFIG.md b/CONFIG.md new file mode 100644 index 0000000..b4c67aa --- /dev/null +++ b/CONFIG.md @@ -0,0 +1,73 @@ +# Configuration + +[<-- Click to return to README.md](./README.md) + +## Redis +Redis is database software and must be installed for Galvanic Corrosion. + +Redis Cloud is recommended for most users, though you can opt to install
+your own self-hosted server using [their install guide for your platform.](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/) + +You'll need an admin user and password to connect to your Redis instance.
+Place the credentials in `config.json`. + +The database index can be used to quickly swap persistent databases.
+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 + +Currently, HTTPS and WSS are unsupported *directly* on GC. You can use a compatiblble reverse proxy solution to secure your server.
+[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.
+For example, your server listens on 10.0.0.6:13370(+13371) but is tunneled to 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`.
+Each field should contain your server's public address with an optional path at the end. + +## Public Configuration +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?) + +`serverId`: Used in the authentication process, uniquely identifies your server to clients. Players should never see this.
+Ideally, this should be unique for every server, and can be chosen by the server administrator. + +`owner`: That's you! You can insert your handle for any social networking site or some form of identification here. + +`motd`: Seen on the dormroom's community board, a short string that displays some message. + +`levelScale`: Beginning at 1 and ending at `maxLevels`, how far apart (XP) each level is. + +`maxLevels`: The maximum number of levels. + +`patches`: *Currently not implemented.* Patch list sent to the client for various game preferences. + +`photonRegionId`: The region to connect to when using Photon Cloud. When using the self-hosted PhotonSocketServer,
+this can be anything *except* for "none" or 4, since there is only one server to connect to and the game uses offline mode when the region ID is set to none. + +## Logging +These three values expose booleans you can change to enable/disable logging various messages sent by the server used for debugging or troubleshooting purposes. + +## Discord +Currently unused. + +A Discord Bot is planned for interacting with your server outside of the game. + +## Auth +Parameters used by the server's authentication mechanisms. + +`secret`: Used to generate tokens. should never be shared (by extension, the whole file) and can be a string of characters containing no words or patterns. +
Use secure cryptography APIs in programming languages to generate random strings. + +`timeout`: The maximum age for a token. \ No newline at end of file diff --git a/README.md b/README.md index 67ff45b..0da89c0 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,22 @@ for Rec Room build 1063 (Timestamp: 637191339113673856, Version: 20200306) drawing +# Disclaimer +Galvanic Corrosion and its contributors are **not** associated in **any** form with: +* RecNet +* Rec Room +* Rec Room, Inc. +* Exit Games Inc. +* Against Gravity +* Photon Network, Photon Engine, or services associated +* Services in use by or associated with the RecNet platform +* Any person(s) in contact with or employed for or with Rec Room Inc. + + +## Configuration + +Read how to configure Galvanic Corrosion [here.](./CONFIG.md) + ## Compiling Galvanic Corrosion - Install