From: miniduikboot Date: Sun, 25 Jul 2021 19:53:43 +0000 (+0200) Subject: Improve docs (#435) X-Git-Tag: v1.6.0~1 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=c63eb3b2d182e01135b8da6187a01e678f9a9d58;p=rhonda%2Fimpostor.git Improve docs (#435) --- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 16583a3..3466190 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,14 +9,14 @@ We are always looking for people to help improve Impostor. - Don't commit unnecessary changes to the codebase or debugging code. - Write meaningful commits or squash them. - Please try to follow the code style of the rest of the codebase. An `.editorconfig` file has been provided to keep consistency. +- Stylecop is also enabled: please make sure your PR compiles without warnings. ## Pull requests - Only make pull requests to the `dev` branch. - Only implement one feature per pull request to keep it easy to understand. - Expect comments or questions on your pull request from the project maintainers. We try to keep the code as consistent and maintainable as possible. -- Each pull request should come from a new branch in your fork, it should have a meaningful name. +- Each pull request should come from a new branch in your fork, it should have a meaningful name. - We try to respond to pull requests as fast as possible. If you think we might have missed it, let us know on [Discord](https://discord.gg/Mk3w6Tb). - -If you have any questions, let us know. \ No newline at end of file +If you have any questions, let us know. diff --git a/docs/Building-from-source.md b/docs/Building-from-source.md index 7ea93fa..1081c76 100644 --- a/docs/Building-from-source.md +++ b/docs/Building-from-source.md @@ -1,8 +1,10 @@ # Building from source +The solution contains the Impostor server and its dependencies, like Hazel and the plugin API. The server is built using [.NET 5](https://dotnet.microsoft.com/download/dotnet/5.0). + ## Cloning Impostor -You need to clone Impostor using git. +You need to clone Impostor using git: ```bash git clone https://github.com/Impostor/Impostor.git @@ -11,6 +13,7 @@ git clone https://github.com/Impostor/Impostor.git ## Building the server ### Dependencies + - [.NET 5 SDK](https://dotnet.microsoft.com/download/dotnet/5.0) - [Rider](https://www.jetbrains.com/rider/) or [Visual Studio](https://visualstudio.microsoft.com/vs/) (Optional, only if you want the full IDE experience) @@ -19,5 +22,8 @@ git clone https://github.com/Impostor/Impostor.git ```bash cd src/Impostor.Server/ dotnet build +# Or if you want a single file, ready for production: (change linux-x64 to win-x64 if you use Windows) +dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true ``` + To setup the server, please look at [Running the server](Running-the-server.md). diff --git a/docs/FAQ.md b/docs/FAQ.md index 14df95f..a274ab9 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -1,11 +1,15 @@ # Frequently Answered Questions ## What is this? -The Impostor project is a reverse engineered and open sourced server for the game Among Us. The game itself is developed by [InnerSloth](http://www.innersloth.com/) while this project is maintained by the community. This project was built out of frustration for the lack of server availability in certain regions and the inability for the core developer, [AeonLucid](https://github.com/AeonLucid), to join a public game. As of this time, it has not been officially endorsed by the studio. + +The Impostor project is a reverse engineered and open source server for the game Among Us. The game itself is developed by [Innersloth](http://www.innersloth.com/) while this project is maintained by the community. This project was built out of frustration for the lack of server availability in certain regions and the inability for the core developer, [AeonLucid](https://github.com/AeonLucid), to join a public game. As of this time, it has not been officially endorsed by the studio. ## Can this be used with the mobile version of the game? -Yes, Impostor can be used with both the Android and iOS\* versions of the game. -###### \* In order to play on an Impostor server with iOS, you _must_ have a jailbroken device. + +Yes, Impostor can be used with both the Android and iOS versions of the game. You can add a custom server via a link, you can do this using the [site](https://impostor.github.io/Impostor) ## How can I get started? + See [Setting up your Server](Running-the-server.md) for more information on running the server and [Client Setup](https://impostor.github.io/Impostor/) for helping your friends join in! + +If you're having issues with the server software, check the [Troubleshooting page](TROUBLESHOOTING.md). diff --git a/docs/Running-the-server.md b/docs/Running-the-server.md index 36a27f4..7912f4f 100644 --- a/docs/Running-the-server.md +++ b/docs/Running-the-server.md @@ -1,30 +1,31 @@ # Running the server -There are currently two modes to run the Impostor server in. The first way is the simplest one and is the one you should probably use. The other way will distribute players across other servers and is a more advanced configuration. +There are currently two modes to run the Impostor server. The first way, Single Server, is the simplest one, can handle up to a few hundred simultaneous players, and is the one you should probably use. Multi-Server mode will distribute players across other servers and is intended for advanced users. ## Single server -### Without docker -1. Install the **.NET 5.0 runtime**. - - [Windows x64](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-5.0.7-windows-x64-installer) - - [Linux x64](https://docs.microsoft.com/en-us/dotnet/core/install/linux) - - [macOS x64](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-5.0.7-macos-x64-installer) +### Without Docker + +1. Install the [.NET 5.0 runtime](https://dotnet.microsoft.com/download). Installing the SDK also works, but is not necessary unless you plan on developing Impostor or Impostor plugins. If you're asked to pick between a console, desktop or server runtime, the console runtime is enough. 2. Find the [latest release](https://github.com/Impostor/Impostor/releases) or the [latest CI build](https://ci.appveyor.com/project/Impostor/Impostor/branch/master/artifacts). -3. Download the version for your OS (linux/win/osx) and your architecture (x64/arm/arm64). +3. Download the version for your OS (linux/win/osx). Impostor is built for multiple CPU-architectures, you most likely want the x64 version, unless you are running on a Raspberry Pi or another device with an ARM processor. 4. Extract the zip. 5. Modify `config.json` to your liking. Documentation can be found [here](Server-configuration.md) *(this step is mandatory if you want to expose this server to other devices)* 6. Run `Impostor.Server` (Linux/macOS) or `Impostor.Server.exe` (Windows) -### Using docker +### Using Docker + +[![Docker Image](https://img.shields.io/docker/v/aeonlucid/impostor?sort=semver)](https://hub.docker.com/r/aeonlucid/impostor) +[![Docker Image](https://img.shields.io/docker/v/aeonlucid/impostor/nightly)](https://hub.docker.com/r/aeonlucid/impostor) -[![Docker Image](https://img.shields.io/docker/v/aeonlucid/impostor?sort=semver)](https://hub.docker.com/repository/docker/aeonlucid/impostor) -[![Docker Image](https://img.shields.io/docker/v/aeonlucid/impostor/nightly)](https://hub.docker.com/repository/docker/aeonlucid/impostor) +After installing Docker, you can just start a Docker container with `docker run`: ``` docker run -p 22023:22023/udp aeonlucid/impostor:nightly ``` -### Using docker-compose +### Using Docker Compose + ``` version: '3.4' @@ -42,7 +43,7 @@ services: ## Multiple servers -Follow the steps from the single server on two or more servers. +Follow the steps from the single server on two or more servers. You should only need to set this up if you have a very large server and can no longer fit everyone on one server: if this is your first time installing Impostor, use a single server. ### Master server diff --git a/docs/Server-configuration.md b/docs/Server-configuration.md index 75996a3..8ae1d07 100644 --- a/docs/Server-configuration.md +++ b/docs/Server-configuration.md @@ -1,35 +1,72 @@ # Server configuration -Some information about all the possible configurations. Click [here](https://github.com/AeonLucid/Impostor/blob/master/src/Impostor.Server/config.full.json) to see all the possible config options. +Some information about all the possible configurations. Click [here](https://github.com/Impostor/Impostor/blob/master/src/Impostor.Server/config-full.json) to see all the possible config options. ## Options ### Required Server Configuration -| Key | Default | Description | -|-|-|-| -| **PublicIp** | `127.0.0.1` | This needs to the public IPv4 address of the server which you give to others to connect. You can find your IPv4 address [on this website](http://whatismyip.host/). Unless you are only planning to use Impostor privately, on your local network, you should change this to your public ip. It is also possible to use hostnames instead of IPv4 addresses, which will be resolved to IPv4 addresses. | -| **PublicPort** | `22023` | The public port of the server which you give to others to connect. (**This is the external port you configure on your router when port forwarding.**) Usually `22023`. | -| **ListenIp** | `0.0.0.0` | The network interface to listen on. If you do not know what to put here, use `0.0.0.0`. Since 1.2.2 it is also possible to use hostnames instead of IPv4 addresses, these must resolve to a valid IPv4 address. | -| **ListenPort** | `22023` | The listen port of the server, usually `22023`. | +| Key | Default | Description | +| -------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| **PublicIp** | `127.0.0.1` | This needs to the public IPv4 address of the server which you give to others to connect. You can find your IPv4 address [on this website](http://whatismyip.host/). Unless you are only planning to use Impostor privately, on your local network, you should change this to your public ip. It is also possible to use hostnames instead of IPv4 addresses, which will be resolved to IPv4 addresses. | +| **PublicPort** | `22023` | The public port of the server which you give to others to connect. (**This is the external port you configure on your router when port forwarding.**) Usually `22023`. | +| **ListenIp** | `0.0.0.0` | The network interface to listen on. If you do not know what to put here, use `0.0.0.0`. Since 1.2.2 it is also possible to use hostnames instead of IPv4 addresses, these must resolve to a valid IPv4 address. | +| **ListenPort** | `22023` | The listen port of the server, usually `22023`. | ### AntiCheat -| Key | Default | Value | -|-|-|-| -| **Enabled** | `true` | Whether the anticheat should be enabled. | -| **BanIpFromGame** | `true` | When a player is caught hacking, they will be kicked from the server. If this value is set to `true`, the player will be banned instead and will not be able to rejoin that specific game. **(Setting this to false does not disable the anti-cheat!)** | +Impostor has an Anticheat that makes it possible to kick cheaters from games automatically. Note that the anticheat is tuned on the vanilla version of the game, so client-side modifications could trigger the Anticheat if you're playing with them. + +| Key | Default | Value | +| ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Enabled** | `true` | Whether the anticheat should be enabled. | +| **BanIpFromGame** | `true` | When anticheat is enabled and a player is caught hacking, they will be kicked from the server. If this value is set to `true`, the player will be banned instead and will not be able to rejoin that specific game. | + +### AnnouncementsServer + +The Announcement Server is used to show update announcements to clients. Using the Plugin API you can create a plugin that serves custom announcements. + +| Key | Default | Value | +| -------------- | --------- | --------------------------------------------------- | +| **Enabled** | `false` | Whether the announcements server should be enabled. | +| **ListenIp** | `0.0.0.0` | See Required Server Configuration. | +| **ListenPort** | `22025` | See Required Server Configuration. | + +### AuthServer + +The Authentication Server is used since Among Us version 2021.3.31 and is used by clients to identify themselves. If you're playing with modded Among Us clients, you can enable this server to skip the 5 second wait to join. + +| Key | Default | Value | +| --------------- | ---------------------- | ---------------------------------------------------- | +| **Enabled** | `false` | Whether the authentication server should be enabled. | +| **ListenIp** | `0.0.0.0` | See Required Server Configuration. | +| **ListenPort** | `22025` | See Required Server Configuration. | +| **Certificate** | `dtls/certificate.pem` | The public certificate used to authenticate with. | +| **PrivateKey** | `dtls/key.pem` | The corresponding private key. | + +On Linux you can generate a certificate by running `openssl req -x509 -newkey rsa:2048 -keyout dtls/key.pem -out dtls/certificate.pem -days 3650 -nodes`. It does not need to be signed. + +### Debug + +The Debug configuration is used to enable the game recorder. This is mostly useful when developing Impostor. + +| Key | Default | Value | +| ----------------------- | ------- | -------------------------------------------- | +| **GameRecorderEnabled** | `false` | Enables the Game Recorder. | +| **GameRecorderPath** | *empty* | Path where the recorded games will be saved. | ### ServerRedirector -In a multi-node setup these need to be specified. -| Key | Default | Value | -|-|-|-| -| **Enabled** | `false` | Whether the server runs in multi-node setup. If this is `false`, all other options in this section do not have any effect. | -| **Master** | `false` | Whether the current server is a master. A master is responsible for redirecting clients to nodes | -| **Locator** | | Fill in either `Redis` or `UdpMasterEndpoint` to choose which method to use for locating other nodes. This must be the same across all servers. | -| **>Redis** | | Format `127.0.0.1.6379`, you can also use a password like so: `127.0.0.1.6379,password=value`. | -| **>UdpMasterEndpoint** | | On the master, this value acts as a listen ip and port. On a node, this should be the public ip and port of the master. Format `127.0.0.1:32320`. | -| **Nodes** | | An array containing public ips and ports of nodes. Only needs to be set on the master. See above for an example. | + +In a multi-node setup these values need to be specified. Note that most people do not need to run a Multi-node setup. + +| Key | Default | Value | +| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Enabled** | `false` | Whether the server runs in multi-node setup. If this is `false`, all other options in this section do not have any effect. | +| **Master** | `false` | Whether the current server is a master. A master is responsible for redirecting clients to nodes | +| **Locator** | | Fill in either `Redis` or `UdpMasterEndpoint` to choose which method to use for locating other nodes. This must be the same across all servers. | +| **>Redis** | | Format `127.0.0.1.6379`, you can also use a password like so: `127.0.0.1.6379,password=value`. | +| **>UdpMasterEndpoint** | | On the master, this value acts as a listen ip and port. On a node, this should be the public ip and port of the master. Format `127.0.0.1:32320`. | +| **Nodes** | | An array containing public ips and ports of nodes. Only needs to be set on the master. See above for an example. | ## Config providers @@ -37,30 +74,9 @@ In a multi-node setup these need to be specified. The simplest option to configure is by using the `config.json` file next to the server executable. For all possible options see the [config-full.json](https://github.com/Impostor/Impostor/blob/dev/src/Impostor.Server/config-full.json) file. -### Command line arguments - -TODO - -``` -Server:PublicIp=127.0.0.1 -Server:PublicPort=22023 -Server:ListenIp=0.0.0.0 -Server:ListenPort=22023 -AntiCheat:Enabled=true -AntiCheat:BanIpFromGame=true -ServerRedirector:Enabled=false -ServerRedirector:Master=true -ServerRedirector:Locator:Redis=127.0.0.1.6379 -ServerRedirector:Locator:UdpMasterEndpoint=127.0.0.1:32320 -ServerRedirector:Nodes:0:Ip=127.0.0.1 -ServerRedirector:Nodes:0:Port=22024 -ServerRedirector:Nodes:1:Ip=127.0.0.1 -ServerRedirector:Nodes:1:Port=22025 -``` - ### Environment variables -TODO +If you're unable to edit the config.json file, you can instead set Environment variables to configure Impostor. The general pattern for each variable is `IMPOSTOR_SectionName__VariableName`. For example, to disable the anticheat, you can set the environment variable `IMPOSTOR_AntiCheat__Enabled=false`. Here are some more examples: ``` IMPOSTOR_Server__PublicIp=127.0.0.1 diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md index 8750159..0a302a1 100644 --- a/docs/TROUBLESHOOTING.md +++ b/docs/TROUBLESHOOTING.md @@ -1,28 +1,57 @@ # Troubleshooting + If you're reading this, something went wrong. Don't worry though, as this is the most thorough guide to help you! ## `./Impostor.Server: line 1: ELF: not found` (plus other errors) + No idea where you got that system. But we clearly do **NOT** support it. ## `cannot execute binary file: Exec format error` -Please check that you have downloaded the right version of Impostor, as we mantain two CPU architectures (x64 and ARM). -Unless you are running Impostor on a SBC (Single-Board Computer), like the Raspberry Pi, you most likely want to use the x64 version. + +Please check that you have downloaded the right version of Impostor, as we mantain two CPU architectures (x64 and ARM). +Unless you are running Impostor on a computer like the Raspberry Pi, you most likely want to use the x64 version. ## `./Impostor.Server: Permission denied` + This is an error related to Linux file permissions. Some files do not hold their executable bit (the permission that allows them to run) during a download. You can solve this by doing: `chmod +x Impostor.Server` -## `You are using an older version of the game` -You are using an older version of Impostor. The game does not really check who is outdated and blames it on the user. -Make sure you got the latest working version of Impostor (probably in AppVeyor, not Github). +## Disconnected with `Your client is too new, please update your Impostor to play` + +This happens when your game is too new for your copy of Impostor to support. + +If you're using an Impostor release, check if there is a newer release available that supports your version. If this doesn't exist, you can try the [latest build from Appveyor](https://ci.appveyor.com/project/Impostor/Impostor/branch/master). + +If even that build doesn't work, you can try looking through the Pull Requests to see if there is a pending pull request that aims to update it to the next version, but note these may be unstable and may contain malicious code, as they haven't been vetted by the Impostor development team yet. + +## Disconnected with `Please update your game to play on this server` + +This happens when you're using a version of Impostor that is too new for your game version. You can download an older version from [the GitHub release page](https://github.com/Impostor/Impostor/releases). We however don't support older versions of Impostor with new API's and bugfixes so we recommend to update your game instead. -## `You disconnected from the server. Reliable Packet 1 ...` -Please double-check that you have followed the [Server Configuration](Server-configuration.md) correctly. -**NOTE: Your public ip does not start with `127` nor `192`** +## Disconnected with `You are using an older version of the game` + +You are using a version of Impostor that is not designed for the version of the game you're playing. The game does not really check who is outdated and blames it on the user. Newer versions (v1.5.0+) do warn correctly and send the correct message. + +Look at which version of the game you're playing, which you can see in the top left corner of the main menu, then download an Impostor version for that game. Every [release on the release page](https://github.com/Impostor/Impostor/releases) shows which version of the game it is compatible with. If your game version is newer than the latest release, check if the [latest build from AppVeyor works](https://ci.appveyor.com/project/Impostor/Impostor/branch/master). + +## Disconnected with `You disconnected from the server. Reliable Packet 1 ...` + +Please double-check that you have followed the [Server Configuration](Server-configuration.md) correctly. +**NOTE: Your public ip does not start with `10`, `127` or `192`** Also check if the port Impostor (ListenPort) is listening on is correctly port-forwarded for UDP (or TCP/UDP). ## `Could not load file or assembly...` -Please check that you only have **working** plugins in the `plugins` folder. + +Please check that you only have **working** plugins in the `plugins` folder. This error can be caused by non-plugin files or plugins that are not working correctly. + +## My question is not yet answered and I'm still having problems! + +That's unfortunate. Join the [Impostor Discord](https://discord.gg/Mk3w6Tb), ask your question there and we'll try to help you out. Note that we're not always available, so it may take some time to get an answer. To make answering your question easier, please add the following details: + +- Which version of Impostor are you using? +- Which version or Among Us are you using? +- Which operating system are you running Impostor on? +- If you have console logs, attaching these will also help.