Multiple guard clauses make the file harder to navigate, so put them in
a single guard clause with one validation rule per line. Some statements
in the file were already set up like this, so this commit makes it consistent
When a game has just been created, it does not yet have any players in
them, and as a result you can't get the host or its connection id when
this event is called. This makes it annoying to link between this event
and the IGameCreationEvent that came just before it.
Having this link is useful for the usecase of a game code allocation
plugin that allocates codes from a pool, and needs to return codes to
a pool if these codes weren't picked.
* Add extra configuration options for the anticheat
* Implement option to exempt hosts from AC checks
* Add AntiCheatConfig to InnerNetObject and friends
* Categorize calls in InnerNetObject.Anticheat
* Categorize other calls to ReportCheatAsync
* Update cosmetics AC handling
When Innersloth changed SetHat etc to SetHatStr as part of the cosmicube
update we accidentally created a few dead methods. Restore and update
the code.
* Push up cheat category to ReportCheatAsync
This makes it possible to log failed checks for diagnosis. Also much
cleaner now that we don't have to push AntiCheatConfig everywhere.
Should've done this immediately q.q
* Add back old version of ReportCheatAsync
some plugins used this method. affected plugins should rebuild after the
next impostor release
* Add documentation for modular anticheat
* Address comments
* Sort AntiCheatConfig keys
* Rework the option to allow cheating hosts
This option should actually be tristate: to not break host-only mods we
should disable the anticheat for hosts running host-only mods.
* Document CheatingHostMode
* Split Limits category in Color and Name Limits
- Update versions to the latest one
- Get rid of .gitmodules as we dumped that years ago
- Change ::set-output to output files as the former is slated for removal
We see that a lot of support tickets are caused by this default setting,
as it is one of the things that blocks connections to the server with no
obvious indication that this is happening. To make it easier for first
time users to set up Impostor, it is important that this setting is
changed.
Previously we also recommended against direct exposing due to security
reasons, but I believe this fear to be unfounded: Microsoft claims that
the Kestrel server is hardened against web server vulnerabilities and
supports its use both with and without a reverse proxy.[1]
We still recommend using reverse proxies if HTTPS support is needed, so
that section of documentation still remains. Setting the ListenIp to
127.0.0.1 is still recommended when using a reverse proxy to remove the
ability for people to connect directly, so we add it there as a recommendation.
[1]: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/when-to-use-a-reverse-proxy?view=aspnetcore-8.0