100 Commits
Author SHA1 Message Date
miniduikboot 703915f06f Correct order of CheatCategory items (#748)
Impostor 1.10.8 introduced PacketSize as a category, which was added in
front of "Other". This caused the value of "Other" to shift, which is a
problem for AC checks. Let's prevent making this mistake again in 1.10.9

Previous commit already moved the Other category back, this commit puts in the note for future developers
2026-10-05 22:15:34 +02:00
miniduikboot 8ee5796d89 fix typo 2026-10-02 22:13:22 +02:00
miniduikboot 7b77165421 Address review comments 2026-10-02 22:13:22 +02:00
miniduikboot 196c01d5e3 Run Dumpostor 2026-10-02 22:13:22 +02:00
miniduikboot fd40e469c5 Bump version 2026-10-02 22:13:22 +02:00
miniduikboot 27b2fc5876 Add Rpc67 SpiritGuideMessage 2026-10-02 22:13:22 +02:00
miniduikboot 8bbe6be4b0 Add SpiritGuide role 2026-10-02 22:13:22 +02:00
miniduikboot 4f372ecabb Add new game version 2026-10-02 22:13:22 +02:00
miniduikboot 5ee0fdb61f Bump version 2026-08-30 18:48:37 +02:00
miniduikboot 44ebc0c6b0 Rerun Dumpostor on 18.0 2026-08-30 18:48:37 +02:00
miniduikboot 681126dfb5 Address my own comments 2026-08-30 18:48:37 +02:00
miniduikboot b78f86f0f3 Fix compile warnings 2026-08-30 18:48:37 +02:00
miniduikboot db9c6ab66c Add special game version for mobile
Thanks Niko
2026-08-30 18:48:37 +02:00
miniduikboot a161aa7045 Add basic implementation of judge overruling 2026-08-30 18:48:37 +02:00
miniduikboot caab877c80 Add support for RoleOptions v11
This is bare minimum bringup for AU v18
2026-08-30 18:48:37 +02:00
miniduikboot 202b955db1 Deserialize gamecode as packed in PackedGameDataTo (#738)
* Deserialize gamecode as packed in PackedGameDataTo

Most packets use a normal 32 bit int but not PackedGameDataTo. Instead,
Innersloth decided to waste a byte by using WritePacked. As v2 game
codes are always negative, this is less efficient, but alas.

It was documented in the pseudocode and I didn't spot the difference
when reviewing the implementation, so I made this mistake when
deduplicating this code.

Test plan:
- Start EHR on at least 2 clients
- Use the game mode "Natural Disasters"
- Observe that pixelated blobs are visible for all players, not just the host

* uopt: stop parsing code to string

* Address review comments
2026-08-14 19:47:39 +02:00
miniduikboot f0689ac2e2 Bump Hazel to 1.0.1 (#735)
This pulls in https://github.com/Impostor/Impostor.Hazel/pull/4
2026-07-01 19:02:24 +02:00
miniduikboot e9437e781b Add compat versions for 17.4
Mobile has a different version than PC for reasons unknown at the
moment, probably related to ads.
2026-06-16 06:05:34 +02:00
miniduikboot 06f4f8bf00 Gate PackedGameDataTo behind AC check 2026-05-24 20:36:02 +02:00
miniduikboot b30775c2fc Add compat version for 17.3 (#724)
* Add compat version for 17.3

* Add compat version for 17.3.1
2026-04-20 22:00:32 +02:00
miniduikboot 764c42eae3 Merge pull request #723 from miniduikboot/fix/aof-concdict
Fix race conditions in Game.Data
2026-03-30 22:30:37 +02:00
miniduikboot 4244f39640 Rename _allObjectsFast to _allObjects
Done because there is no second datastructure anymore
2026-03-27 23:32:57 +01:00
miniduikboot 069ec446cd Switch to concurrent dictionary
PR proposed in #722 doesn't solve all issues, now Nullrefs show up.

Also drop _allObjects as it's never read.
2026-03-26 23:58:45 +01:00
miniduikboot 98783e5b42 Merge pull request #717 from Impostor/feature/17.2.2
Add 17.2.2 version
2026-03-22 23:06:45 +01:00
miniduikboot fd12cd1a39 Add 17.2.2 version
Only changes are ad related, and officials allow crossplay
2026-03-17 20:18:25 +01:00
miniduikboot 139f2334a2 Merge pull request #716 from Impostor/feature/17.2-hotfix
Add 17.2 hotfix version
2026-03-04 20:31:58 +01:00
miniduikboot 60371d538c Add 17.2 hotfix version 2026-02-19 21:34:54 +01:00
miniduikboot 6e68747fe0 Merge pull request #715 from Impostor/feature/17.2
Add 17.2 version
2026-02-18 07:24:47 +01:00
miniduikboot 3736b37831 Add 17.2 version
https://www.innersloth.com/announcing-among-us-x-ace-attorney-again/
2026-02-18 07:19:36 +01:00
miniduikboot eeb85e4abc Merge pull request #712 from miniduikboot/feature/aumi-host-chat-cmds
Add support for host chat cmds
2026-02-18 07:17:58 +01:00
miniduikboot fd33a892cd Reduce warnings about +25
As Innersloth documented it in their mod info document, assume it's here
to stay, so warn about it less heavily
2026-01-27 22:41:42 +01:00
miniduikboot fbdb708941 Implement host chat commands
On January 21 Innersloth released a document that details a few new
features. One of these are host chat commands: any chat message that
starts with "/cmd" is forwarded to the host and to the host only.

Implement this feature in Impostor too for implementation parity.

For more info, see their GitHub page:
https://github.com/Innersloth-LLC/AmongUsModdingInformation
2026-01-27 22:17:03 +01:00
miniduikboot 9a60ce3d56 Merge pull request #708 from Impostor/feature/17.1
Bump compatversion to support 17.1
2026-01-27 20:38:36 +01:00
miniduikboot d7601e8057 Add another mobile-only hotfix
From their Discord:

Admin has pushed hotfix v17.1.2 for mobile players! minor changes to the ad rewards to the daily cap (subject to future change) and updated the screen to clarify when the daily cap is reset.
2025-12-11 22:20:17 +01:00
miniduikbootandNiko233 0e9454ecdf Bump compatversion to support 17.1.1
https://www.innersloth.com/ad-rewards-v17-1-1/

Thanks to Niko for reminding me about this

Co-Authored-By: Niko233 <139348239+NikoCat233@users.noreply.github.com>
2025-12-07 10:33:23 +01:00
miniduikboot ce5a491cdb Bump compatversion to support 17.1 2025-11-18 20:50:57 +01:00
miniduikboot 16c8acc849 Merge pull request #706 from NikoCat233/patch-1
Add missing comment for game version 16.1.0
2025-11-18 20:50:46 +01:00
miniduikboot 18846d3dd4 Merge pull request #705 from Impostor/feature/17.0.1
Bump to 17.0.1
2025-10-15 20:42:47 +02:00
miniduikboot eb231dc393 Bump to 17.0.1 2025-10-14 20:29:33 +02:00
miniduikboot a00b9e63d8 Merge pull request #702 from Impostor/feature/17.0.0
Add support for 17.0.0
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
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
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 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
2024-10-24 19:47:01 +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
miniduikboot f6318c7040 Merge pull request #609 from Impostor/feature/2024.6.18-prepare
Prepare for 2024.6.18 update
2024-08-20 21:50:45 +02:00
miniduikboot ed9f6e3134 Add Phantom to the list of Impostor roles 2024-08-20 21:41:38 +02:00
miniduikboot 219b72a3d1 Clean up owned playerinfo's when disconnecting
This commit does what official servers do:
- despawn the PlayerInfo if someone disconnects while in the lobby
- despawn all PlayerInfos at the end of a game when the EndGame screen
is shown. At this point a lot of other netobjects are destroyed as well,
with the PlayerInfos generally done first.
2024-08-20 21:41:38 +02:00
miniduikboot 01e9cccdf5 Set PlayerLevel in PlayerInfo on RPC SetLevel
Previously this used to be done by the host, but this is now the
server's responsibility.
2024-08-20 21:41:38 +02:00
miniduikbootandjs6pak fc79bd1536 Add Message24EndGameHostMigration serialization
Looks like Innersloth added this but hasn't actually used this. Weird..

When sent it makes the new host perform a full rejoin, which gums up
Impostor's spawning logic. Fixing that causes the client to gum itself
up. Sigh.

After some testing it seems like host migration still works fine, so
this investigation wasn't needed. Committing for posterity.

Co-Authored-By: js6pak <me@6pak.dev>
2024-08-20 21:41:38 +02:00
miniduikboot 9e1abe07ef Switch PlayerName writes to Outfit
In 2024.6.18 Innersloth changed the storage location of the PlayerName
from PlayerInfo to PlayerOutfit. If we don't set the PlayerName, we'll
send an incomplete PlayerInfo to new players, so new players are unable
to stay connected as they will not receive complete PlayerInfo objects
before a timeout in the client activates.

Because we publish PlayerName in the API, we can't completely remove
the PlayerName field from PlayerInfo. We also use it internally in a few
places, so I don't this is worth removing.
2024-08-20 21:41:38 +02:00
miniduikboot ccd36b6571 Sync over tasks
As tasks used to be part of the GameData, 2024.6.18 has moved them to
the PlayerInfo. Because they are now called on the PlayerInfo of the
correct player, the playerId field in the RPC is no longer necessary.
2024-08-20 21:41:38 +02:00
miniduikboot 44e9dfe28d Bump to 2024.8.13
Network side seems unchanged and officials allow crossplay
2024-08-20 21:41:38 +02:00
miniduikboot 09cadcb63b Spawn PlayerInfo's if host is not authoritive
This PlayerInfo also needs to be synced over if it is server owned
2024-08-20 21:41:38 +02:00
miniduikboot b118af12be Add NetId to SetName and SetColor
2024.6.18 adds a NetId field *in front* of the existing fields to help link back to the PlayerInfo. We don't actually need this NetId and assume it's called on the correct PlayerControl, so we ignore it.
2024-08-20 21:41:38 +02:00
miniduikboot 372ed8511f Set RoleWhenAlive when set to a Ghost role 2024-08-20 21:41:38 +02:00
miniduikboot 85296d2d46 Serialize Color -1 as 0 in PlayerOutfit
Official servers send 0 instead of -1 when the outfit is still
incomplete to prevent some client issues.
2024-08-20 21:41:38 +02:00
miniduikboot c43fdd2a69 Demote InnerGameData, promote InnerPlayerInfo
In 2024.6.18 Innersloth promoted PlayerInfo to its own network object, and gave it to the server. InnerGameData is now a container that holds these players. This commit implements the changes necessary to handle these separate PlayerInfo network objects.
2024-08-20 21:41:38 +02:00
miniduikboot 615469c6c8 Add dirty tracking to PlayerOutfit
To prevent excessive modifications in the codebase, which is prone to
issues if a callsite is missed, automatically do this using properties.

Keep the access modifiers intact for now.
2024-08-20 21:41:38 +02:00
miniduikboot 482b8c2b72 Add sequence id's to playeroutfit 2024-08-20 21:41:38 +02:00
miniduikboot 2eca9b4e9f Add canOverrideRole param to SetRole
This is currently unused by Innersloth
2024-08-20 21:41:38 +02:00
miniduikboot 079f58a7b7 Implement GameOptions V8
This adds a field for RulesPresets and SpecialGameModes, as well as
RoleOptions for the new roles.
2024-08-20 21:41:38 +02:00
miniduikboot c315ef9c28 VoteBanSystem now contains itself as a component
This makes it consistent with the other spawnables.
2024-08-20 21:41:38 +02:00
miniduikboot 0e7372d9d9 Update Dumpostor to v1.0.1 and run for 6.18
Add the RulesPresets and SpecialGamemodes enums
2024-08-20 21:41:38 +02:00
miniduikboot bf5a2c2be5 Prepare for 2024.6.18 update
Major changes are incoming, this doesn't yet work.
2024-08-20 21:41:38 +02:00
miniduikboot 066eca09ee Add scene param to forbidden scene log statement
I'm seeing multiple warnings in my server log about forbidden scene
changes. Unfortunately this warning does not include the actual scene
that was triggering the issue, which makes diagnosis/remediation difficult.

Additionally change this logging call to use names suitable for
structured logging.
2024-08-20 17:18:00 +02:00