816 Commits
Author SHA1 Message Date
miniduikboot a00b9e63d8 Merge pull request #702 from Impostor/feature/17.0.0
Add support for 17.0.0
v1.10.4
2025-09-26 20:22:43 +02:00
miniduikboot d7e5594cf6 Run Dumposter on 17.0.0 2025-09-22 21:06:05 +02:00
miniduikboot 8ba89d9844 Add GameOptions V10
Manually added roles to RoleTypes, will clean up later
2025-09-09 20:40:07 +02:00
miniduikboot ebd7f99438 Bump to 1.10.4
No breaking changes expected
2025-09-09 20:39:31 +02:00
miniduikboot 2197434bdc Add version block for 17.0.0 2025-09-09 20:16:31 +02:00
miniduikboot 8f54566245 Add trailing comma
Fixes compile warning
v1.10.3
2025-06-05 22:39:11 +02:00
miniduikboot a70e875a4d Update System.Text.Json 2025-06-05 22:39:11 +02:00
miniduikboot e473e4cdb4 Merge pull request #692 from miniduikboot/doc/https-now-mandatory
Update docs to add that HTTPS is now mandatory
2025-06-05 22:31:25 +02:00
miniduikboot 9169fab67d Update FAQ for AU3D 2025-06-02 22:52:45 +02:00
miniduikboot 565bf26ff8 Clarify startup warning 2025-06-02 22:52:24 +02:00
miniduikboot 8fb996b314 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
2025-06-02 22:49:45 +02:00
miniduikboot 46a6005ba5 Don't clear RoleOptions on update
Among Us always adds a constant amount of roles to this dict, so it
doesn't make sense to clear this dictionary every time.

Furthermore, previously it was possible to trigger a
ConcurrentModificationException when running Deserialize in parallel
with Serialize. This should no longer happen, as new keys are no longer added
2025-05-28 22:34:57 +02:00
miniduikboot 0ac0b1d403 Address review comments 2025-05-22 23:50:28 +02:00
miniduikboot e1bd85313a Remove AllowNull from PlayerControl.PlayerInfo
It is possible to spawn invalid network objects without an attached
PlayerInfo, and Impostor will throw exceptions everywhere if you happen
to spawn one. Officials do allow spawning objects like this, so allow it
in Impostor for compatibility reasons
2025-05-22 23:50:28 +02:00
miniduikboot fff9713697 Add new cheat category for InvalidObject checks
For some network objects, like PlayerControl, we expect that there is an
PlayerInfo object associated to them. If there isn't, throw an exception
in this AC category
2025-05-22 23:50:28 +02:00
miniduikboot be0a0b917c Add Murder/Protect/Exile API without checks
Force(.*)Async will perform the same function as \1Async but without
throwing exceptions. The old API is maintained for backwards
compatibility reasons.

Murder checks are now shared with the main function that handles
CheckMurder, as ProtectPlayerAsync and ExileAsync aren't used in the
code I didn't make a similar change there. Checks were also synced
between both methods
2025-05-22 23:50:28 +02:00
miniduikboot c672e19e99 Always store previous color
Because it's only restored in standard SA networking, the stored value
will be ignored in HA. This is preferred to logging when in HA mode
2025-05-22 23:48:50 +02:00
miniduikboot 104376b43f Record and restore player colors
This prevents situations where a player that requested red has a
different color when rejoining because red is the default color of a
PlayerInfo object. This is most noticeable if the host is late with
rejoining, and a lot of players are alreading in WaitingForHost limbo.

When the host finally rejoins, they will not assign Red immediately to
players that requested Red as it is "in use", and instead assign the
next color.

By recording and restoring this is avoided, and players tend to get
their own colors back in most cases.

This is not something that officials do at the moment, but I don't think
this has an impact on mods, as a normal checkcolor/setcolor cycle will
take place as usual.
2025-05-22 23:48:50 +02:00
miniduikboot 92ca5aa9d7 Merge pull request #690 from Impostor/feature/16.0.5
Add 16.0.5 support
2025-05-22 23:13:49 +02:00
miniduikboot 67e94e8efc Add 16.0.5
Crossplay with the previous version is not supported, so it gets its own
compatibility group.

Further analysis on the changes is still needed
2025-05-20 19:48:57 +02:00
miniduikboot da8353655d Merge pull request #683 from Impostor/feature/16.0.0
Add support for 16.0.0
2025-04-03 21:31:35 +02:00
miniduikboot dab8751f1d Add note to old game methods
These are no longer used, so warn people who do want to edit them.

I don't foresee these getting removed soon though, as we do want to kick
players on old versions for having an old game version
2025-04-01 23:50:17 +02:00
miniduikboot 723495e390 Add GameTags enum
Can't be generated from game files at the moment unfortunately
2025-04-01 23:49:46 +02:00
miniduikboot cd220530ac Remove GameListingV2
The game ignores unknown fields when deserializing, and as only fields
were added it's acceptable to merge the structs together
2025-04-01 23:48:32 +02:00
miniduikbootandNiko233 fc2679a8d2 Add stub for Find Lobby endpoint
Co-Authored-By: Niko233 <139348239+NikoCat233@users.noreply.github.com>
2025-03-30 20:35:19 +02:00
miniduikbootandNiko233 28e933092a Stop hardcoding the GameOptions in GameListingV2
To prevent needing to pull in Impostor.Hazel, use an extension method
instead.

Thanks Niko for researching this part

Co-Authored-By: Niko233 <139348239+NikoCat233@users.noreply.github.com>
2025-03-30 20:35:03 +02:00
miniduikboot 06289d46c0 Bump minor version
At this point it doesn't seem necessary to drop support for old
Amoguses, so just bump the minor version for support purposes
2025-03-30 20:34:18 +02:00
miniduikboot 6bd13c0399 Forbid crossplay between 2024.10.29 and 16.0
Innersloth also forbids it, and it's likely not possible due to the new
GameOption version
2025-03-30 20:34:18 +02:00
miniduikboot 7e85419b82 Add endpoint to find games by code
This is used in the new "Enter Code" flow

3 extra fields are added to GameListing, including a Base 64
serialization method for game options
2025-03-30 20:34:18 +02:00
miniduikboot 3e2c3f1525 Update Game Options
Creating a game is now possible
2025-03-30 20:34:18 +02:00
miniduikboot 61cbd5c4d8 Add new network version 2025-03-30 20:34:18 +02:00
miniduikbootandjs6pak 495dc01948 Add diagnostic http message (#663)
* Add diagnostic message to test HTTP server

This makes it possible to diagnose if the reverse proxy setup is working
correctly or if the game configuration is wrong

* Print console log as well

Only print it once to prevent console spam

* Update src/Impostor.Server/Http/HelloController.cs

Co-authored-by: js6pak <me@6pak.dev>

---------

Co-authored-by: js6pak <me@6pak.dev>
2025-01-26 18:00:03 +01:00
Chipmunk a448ece73e Add missing cosmetic methods to IInnerPlayerControl 2025-01-26 17:58:42 +01:00
miniduikboot e7b98f1842 Push down AC checks in PlayerPhysics as well
I've checked Impostor for issues that are similar to #664, and found
this one: if mods add a custom rpc on PlayerPhysics, Impostor will check
ownership of it, which isn't intentional.
2025-01-26 17:42:18 +01:00
miniduikboot d65e99fe45 Move down target AC check in InnerShipStatus
Mods may send RPC's on a ShipStatus that aren't broadcasts. Previously
Impostor would forbid that, which doesn't make sense to me. By moving
down the check it'll allow mods to broadcast RPC's on ShipStatus.

Reported-By: xtracube
2025-01-26 17:41:13 +01:00
miniduikboot bb980096ff Bump version to 1.10.2 v1.10.2 2024-12-22 17:02:56 +01:00
miniduikbootandjs6pak 58a8bda8e7 Check for disconnection between handling messages
Without this, it is possible for clients to get the remainder of their
messages handled in a packet.

Co-Authored-By: js6pak <me@6pak.dev>
2024-12-22 17:02:56 +01:00
miniduikbootandjs6pak a7c37b6bcf Clean up abandoned games on disconnect
When a client disconnects without ever having joined a game, it leaves
behind an empty game on the server. Remove these when a player
disconnects.

Co-Authored-By: js6pak <me@6pak.dev>
2024-12-22 17:02:56 +01:00
miniduikbootandjs6pak 792c9626e4 Prevent clients from creating a second game
Legitimate clients will never create a second game using the same
connection.

Co-Authored-By: js6pak <me@6pak.dev>
2024-12-22 17:02:56 +01:00
miniduikboot e4f81b4a30 Bump to Among Us 2024.10.29 (#656)
Inspected mono, no networking changes found.

Ran dumpostor as well

Bumped Impostor version
v1.10.1
2024-10-24 19:47:01 +02:00
danbudworthmead 2603f34b89 Bugfix/fix outfit RPCs (#653)
* implemented the sequence ID

* implemented the sequence ID for the player outfits

the sequence ID in the set call must be greater than that stored on the client otherwise the client disregards the set call.

* make sequence IDs internal

* added space after closing brace

* make the sequence ID addition +5
2024-10-05 12:44:08 +02:00
Niko233 9b27edbb11 Remove unused HandleSetInfected 2024-10-05 12:28:50 +02:00
danbudworthmead 2f9406cb6a updated the api call to use the setnamerpc serialise
the client now expects a byte which is the netid otherwise the setname call wont work
2024-10-05 12:28:16 +02:00
Niko233 d5f48aa798 Fix vanilla venting as Phantom cause a ban v1.10.0 2024-09-07 08:53:45 +04:00
js6pak ff5501aab7 Add support for 2024.9.4 2024-09-05 05:09:34 +02:00
js6pak acc4da1210 Fix RemovePlayer reason on internal disconnects 2024-08-24 16:52:50 +02:00
js6pak a0f0a65cbf Send DisconnectReason.Hacking to other players when disconnecting for cheating
Base game doesn't have a specific message for it so it results in a generic "left the game due to error" but it's still better than the default "left the game".
This also allows client side mods to fix the message.
2024-08-24 16:51:51 +02:00
js6pak 6c91280125 Fix cheating disconnect message
DisconnectReason.Hacking has been broken in base game for a long time so replace it with a custom message.
Also add a random support code for easier debugging in case of false positives.
2024-08-24 16:51:51 +02:00
miniduikboot 2ddbb8891c Refactor SetColor anticheat
One issue with the ColorLimits checks is that it didn't account for mods
that add extra colors, this is fixed by checking if the route followed
is plausible instead of mimicking client logic and only accepting a
single answer that it expected. A false negative is possible where the
host decides to wrap back to the front but there are still custom colors
available at the end of the list. This is acceptable because Impostor
doesn't currently know the amount of colors available and this issue
isn't major enough to ask all mod authors to declare their custom color
amount to the server.

As extra colors should now be handled by this code, it makes sense to
change the category of the unknown colors check to ProtocolExtensions.
For these mods an exemption of the ColorLimits category is no longer
necessary.

Note that mods that allow duplicate colors that do not use a custom rpc
to set colors can only be supported by disabling the ColorLimits
category, this was already the case and I don't think it can be unified
with the existing check.
2024-08-23 18:04:52 +02:00
Niko233 8c52b13af4 更新 Game.State.cs 2024-08-22 08:12:47 +02:00