From: miniduikboot Date: Mon, 2 Jun 2025 20:49:45 +0000 (+0200) Subject: Update documentation for mandatory HTTPS X-Git-Tag: v1.10.3~2^2~2 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=8fb996b31411617a55635861b62929c509ebcda8;p=rhonda%2Fimpostor.git Update documentation for mandatory HTTPS The new Unity version used by Among Us 16.0.5 disables the "InsecureHttpOption", which blocks UnityWebRequests via HTTP. Therefore all Impostor servers should now switch to HTTPS. https://docs.unity3d.com/2022.3/Documentation/ScriptReference/InsecureHttpOption.html Thanks to TianMengLucky for reporting this and NikoCat233 for identifying the cause --- diff --git a/docs/Http-server.md b/docs/Http-server.md index fd54685..a8ab482 100644 --- a/docs/Http-server.md +++ b/docs/Http-server.md @@ -1,19 +1,13 @@ # HTTP Server -Since Impostor 1.9.0 a HTTP service is included for matchmaking. Recent versions of Among Us require this service in order to connect correctly and not kick players after a round. +Since Impostor 1.9.0 a HTTP service is included for matchmaking, which is required for clients to connect to the Impostor server. -Depending on whether you want to support mobile players, you can set up the HTTP server in one of two ways: - -- Directly expose the HTTP server. Simpler, but only works if you don't want to support mobile players. -- Use a reverse proxy to expose the HTTP server. More complex, but allows mobile players to connect. - -## Directly expose the HTTP server. - -In config.json, set "ListenIp" to "0.0.0.0" in the "HttpServer" section. If you don't have this section, look in the example [config.json](https://github.com/Impostor/Impostor/blob/master/src/Impostor.Server/config.json) +Starting from Among Us 16.0.5, you need to set up HTTPS for players to connect to your server. +Unfortunately Impostor doesn't handle SSL certificates, so you need to set up a reverse proxy. ## Use a reverse proxy -A reverse proxy allows you to forward HTTP requests from users to multiple services. If you already have one, you should configure it to add Impostor. This page contains an Nginx configuration you can use for reference. +A reverse proxy allows you to forward HTTP requests from users to multiple services. If you already have one, you should configure it to add Impostor. If you have never set up a reverse proxy before, we recommend you to set up [Caddy](https://caddyserver.com/). It is easy to set up and comes with support for requesting SSL certificates out of the box. @@ -65,3 +59,24 @@ server { ``` + +## Stop exposing Impostor's HTTP server to the internet directly + +To only allow connections to Impostor's HTTP servers via the reverse proxy, we recommend to set the ListenIp of the HTTP server to 127.0.0.1: + +```json +{ + // NOTE: merge this snippet into the rest of your configuration + "HttpServer": { + "ListenIp": "127.0.0.1" + } +} +``` + +Or if you're configuring Impostor with environment variables: + +```sh +IMPOSTOR_HttpServer__ListenIp=127.0.0.1 +``` + +For more information on server configuration, see [Server-configuration.md](Server Configuration). diff --git a/docs/Running-the-server.md b/docs/Running-the-server.md index d1d4793..33502ed 100644 --- a/docs/Running-the-server.md +++ b/docs/Running-the-server.md @@ -10,7 +10,9 @@ To connect to the server, you need to configure and install a region file on htt Among Us connects to the server using two network services: the (TCP) HTTP service points Among Us to the UDP service, then the UDP service hosts the actual game traffic. Because of this, Impostor uses port 22023 using **both** the TCP and UDP protocols. -As the phone version of Among Us requires this HTTP connection to be secure, we recommend using a HTTP reverse proxy to terminate SSL on the HTTP service. Setup instructions for this are in the [Http Server documentation](Http-server.md). +To connect to your Among Us version from another PC, you need to set up a HTTP reverse proxy to support HTTPS. If you're just running a version of Impostor for testing Setup instructions for this are in the [Http Server documentation](Http-server.md). + +If you want to test if your Among Us HTTP server is working, open `http://localhost:22023` (assuming you're using the default settings, change the IP and port respectively) in a browser Depending on your host you may also need to port forward Impostor to the internet or pass Impostor traffic by your firewall. Port 22023 UDP needs to be accessible for everyone that wants to play on the server, then you also need to portforward your HTTP reverse proxy or port 22023 TCP if you don't use a reverse proxy. As port forwarding changes per host or router configuration, port forwarding is not covered by this guide. @@ -21,8 +23,9 @@ Depending on your host you may also need to port forward Impostor to the interne 3. Extract the zip. 4. Modify `config.json` to your liking. Documentation can be found [here](Server-configuration.md). You need to at least change `PublicIp` to the address people will connect to your server to. 5. Run `Impostor.Server` (Linux/macOS) or `Impostor.Server.exe` (Windows) -6. (OPTIONAL - Linux) Configure a systemd definition file and enable the service to start on boot, see [systemd configuration](Server-configuration.md#systemd) -7. (OPTIONAL) Set up a reverse proxy to support HTTPS, so mobile phones can connect, see [reverse proxy configuration](Http-server.md) +6. Set up a reverse proxy to support HTTPS, so you can connect to your server from another device. See [reverse proxy configuration](Http-server.md) +7. (OPTIONAL - Linux) Configure a systemd definition file and enable the service to start on boot, see [systemd configuration](Server-configuration.md#systemd) + ## Using Docker @@ -34,7 +37,7 @@ Docker is a program that allows you to run programs like Impostor in a container After installing Docker, you can just start a Docker container with `docker run`: ``` -docker run -p 22023:22023/tcp -p 22023:22023/udp -e IMPOSTOR_Server__PublicIp=your.public.ip.here aeonlucid/impostor:nightly +docker run -p 127.0.0.1:22023:22023/tcp -p 22023:22023/udp -e IMPOSTOR_Server__PublicIp=your.public.ip.here aeonlucid/impostor:nightly ``` Please replace `your.public.ip.here` with the public IP address of your server. This is the address Among Us will try to reach your server at. @@ -43,7 +46,7 @@ To configure the docker container, either use environment variables or mount con ## Using Docker Compose -Docker Compose allows you to start a Docker container using a prefined configuration. This is an example configuration you can continue on: +Docker Compose allows you to start a Docker container using a predefined configuration. This is an example configuration you can continue on: ``` version: '3.4' @@ -53,12 +56,12 @@ services: image: aeonlucid/impostor:nightly container_name: impostor ports: - - 22023:22023/tcp # Add "127.0.0.1:" if you're using a reverse proxy to terminate HTTPS + - 127.0.0.1:22023:22023/tcp # Set up your own reverse proxy to terminate HTTPS - 22023:22023/udp - environment: # Either configure Impostor using environment variables or mount a copy of config.json + environment: # Either configure Impostor using environment variables or mount config.json in your container - IMPOSTOR_Server__PublicIp=your.public.ip.here volumes: - - /path/to/local/config.json:/app/config.json # For easy editing of the config + - /path/to/local/config.json:/app/config.json # Mount config.json - /path/to/local/plugins:/app/plugins # Only needed if using plugins - - /path/to/local/libraries:/app/libraries # Only needed if using external libraries + - /path/to/local/libraries:/app/libraries # Only needed if using external libraries (some plugins may need this) ```