Giter Site home page Giter Site logo

impostor's Introduction

Impostor

Discord CI

Impostor is the first working Among Us private server, written in C#.

As Among Us is actively updated, you may want to use the latest build from the master branch if you want to play on the latest version of Among Us that supported by Impostor.

If you want to play on an older version of Among Us, you can download old releases from here, however these versions are less supported.

Features

  • All Among Us features are implemented. It is a full replacement for the official server.
  • Plugin support.
  • Server-sided anticheat.

Installation

Client

If you just want to play on a server hosted by someone else, you need to configure your client to connect to an Impostor server. Please go to this website to set up your client by following the instructions for your OS there.

Server

See the docs for instructions on how to set it up.

Troubleshooting

See TROUBLESHOOTING to solve issues with the Impostor client or the server.

Contributing

See CONTRIBUTING.

License

This software is distributed under the GNU GPLv3 License.

Credits

impostor's People

Contributors

112batman avatar aeonlucid avatar alexejhero avatar bkloosterboer avatar cchudant avatar cybershard avatar danbudworthmead avatar dimaguy avatar gerardsmit avatar harmhoog avatar hiumee avatar hmmbob avatar hplewis avatar jkamsker avatar johntranqut avatar jorgenphi avatar js6pak avatar miguemely avatar miniduikboot avatar minorusama avatar mm2pl avatar mr-vit avatar reecebenson avatar saghetti0 avatar sombrasoft avatar svennergr avatar tuxinal avatar ykundesu avatar yukieiji avatar ziadmontaser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

impostor's Issues

Missing VB.NET API instructions

It is possible to write plugins targeting the .NET Standard from any language that supports the standard. That mostly includes C# but also VB.Net
I was wondering if it would be possible to include such instructions so plugin development could be easier to get into.

Linux client

Feature Request

Feature Information:

I confirm:

  • that I have searched for an existing feature request matching the description.

I would really appreciate a linux client for this. I know that .NET doesen't work on linux but please make it so it is easily runnable using mono or wine.

Tasks are partially working

Bug Report

Base Information

I confirm:

  • that I have searched for an existing bug report for this issue.

Symptoms

Disconnecting player after upload try on Polus map

Reproduction

1.

  • Download in weapons
  • Upload in comms*

2.

  • Go below O2, to room where are two wheels (water?), and use them *

there's a something like 50/50 chance that you gonna get disconnected in any of those

Logs

Oct 28 19:49:22 94-130-125-94 IMPOSTOR_STABLE[19418]: [19:49:22 ERR] Invoking data received failed
Oct 28 19:49:22 94-130-125-94 IMPOSTOR_STABLE[19418]: System.IndexOutOfRangeException: Index was outside the bounds of the array.
Oct 28 19:49:22 94-130-125-94 IMPOSTOR_STABLE[19418]:    at Impostor.Hazel.MessageReader.ReadByte()
Oct 28 19:49:22 94-130-125-94 IMPOSTOR_STABLE[19418]:    at Impostor.Server.Net.Inner.Objects.InnerMeetingHud.PlayerVoteArea.Deserialize(IMessageReader reader)
Oct 28 19:49:22 94-130-125-94 IMPOSTOR_STABLE[19418]:    at Impostor.Server.Net.Inner.Objects.InnerMeetingHud.Deserialize(IClientPlayer sender, IClientPlayer target, IMessageReader reader, Boolean initialState)
Oct 28 19:49:22 94-130-125-94 IMPOSTOR_STABLE[19418]:    at Impostor.Server.Net.State.Game.HandleGameDataAsync(IMessageReader parent, ClientPlayer sender, Boolean toPlayer)
Oct 28 19:49:22 94-130-125-94 IMPOSTOR_STABLE[19418]:    at Impostor.Server.Net.Client.HandleMessageAsync(IMessageReader reader, MessageType messageType)
Oct 28 19:49:22 94-130-125-94 IMPOSTOR_STABLE[19418]:    at Impostor.Server.Net.Hazel.HazelConnection.ConnectionOnDataReceived(DataReceivedEventArgs e)
Oct 28 19:49:22 94-130-125-94 IMPOSTOR_STABLE[19418]:    at Impostor.Hazel.Connection.InvokeDataReceived(IMessageReader msg, MessageType messageType)
Oct 28 19:49:22 94-130-125-94 IMPOSTOR_STABLE[19418]: [19:49:22 INF] BSEASX - Player XXX (100) has left.
Oct 28 19:49:22 94-130-125-94 IMPOSTOR_STABLE[19418]: [19:49:22 INF] BSEASX - Assigned YYY(102) as new host.
Oct 28 19:49:22 94-130-125-94 IMPOSTOR_STABLE[19418]: [19:49:22 INF] Client 100 disconnecting, reason: Invoking data received failed.

From client perspective:
image

Bug with scan, lights repair

Bug Report

Base Information

  • Operating System - Win10
  • Imposter Version - 1.2.0
  • Among Us Version - v2020.9.22s

I confirm:

  • [x ] that I have searched for an existing bug report for this issue.

Symptoms

Try to submit scan as crewmate, you're getting banned for hacking :)

Reproduction

Go submit scan as crewmate, sometimes work perfectly, but for many others it gonna result as ban.

Log

Oct 25 15:39:37 94-130-125-94 IMPOSTOR[4620]: [15:39:37 INF] Client 31 disconnecting, reason: Client sent RepairSystem as crewmate.

-- Edit
the same is happening while trying to "fix" any of sabotage or similar, open doors (Polus) and so on.

Conclusion, propably packets are miss-*(ing|mapped) or something?

Change the unchangeable via chat commands?

Feature Request

Feature Information:

I would appreciate to see the ability to change a few room settings, namely:

  • the map
  • the maximum amount of players
  • the amount of impostors

To my current knowledge, it is not possible to change those in the stock server without leaving to main menu and recreating the lobby. Which is of course problematic, because we have to distribute the new game code and get all the people to re-join. What I propose is some kind of commands that could be executed in the chat while in lobby (by host only? configurable?), which could let us alter these on-the-fly, in an existing lobby, assuming there isn't any major obstable client-side that would prevent that from being possible.
Not sure if that's something for the core or the incoming plugins system though...

I confirm:

  • that I have searched for an existing feature request matching the description.

How can Android use the server

Feature Request

Feature Information:

I confirm:

  • that I have searched for an existing feature request matching the description.

Domain name support in config.json

Feature Request

Allow supplying a domain name instead of an ip address in the PublicIp key of the configuration file

Feature Information:

I'm hosting the server home but my ISP doesn't provide static ipv4 addresses. I use a tool to keep my domain in sync with whatever public IPv4 address I have. It would be great to automatically resolve the domain during application startup so I just need to restart the server and not edit the configuration file every time my ip changes.

I confirm:

  • that I have searched for an existing feature request matching the description.

Searched for "ip", "dns" and "domain" and read the title of the several open issues. Hope this one is not a duplicate !

Add tests for packet serialization and deserialization

Feature Request

Feature Information:

I would like to have (de)serialization tests added for Message00HostGame, Message01JoinGame etc. to reduce possible problems with changing those classes.

I confirm:

  • that I have searched for an existing feature request matching the description.

Game shows private instead of public

So I thought I had fixed this but apparently it regressed.
The fix I thought that worked is 7de9b71.

To reproduce you need two clients.

One:

  • Create a game
  • Put it to public

Two:

  • Join the game through "Find game"

Then you see that on one client it shows private and on the other public.
It does however work when you change it when you're already ingame.

Connecting via Mobile

Firstly, amazing job! Me and some friends haven't been able to play via the official means and this has completely saved our game nights. Kudos!

I saw in the README though that BOTH desktop and mobile are supported by the private server. If there are any instructions on how a mobile user can join a dedicated server then I would love to give them a shot! ๐Ÿ˜

Memory leak during gameplay

Bug Report

Base Information

  • Operating System: Linux (Docker)
  • Imposter Version: 1.0.0
  • Among Us Version:

I confirm:

  • that I have searched for an existing bug report for this issue.

Symptoms

During normal party gameplay, the Docker container leaks around 4GB of memory per hour.

I assume this is some sort of poorly directed log file that's just filling up the memory?

Reproduction

Play a game (in our case, with 8/9 players). The containers memory usage will gradually increase until your system lags and the lobby crashes.

I resorted to just restarting the container every hour.

Add event cancelling to chat messages

Api Suggestion

Suggestion

As the ability to cancel events with the API

Use case

For my particular use case, I want to be able to cancel message events starting with /

Expected result

Player Sends Message Starting With "/",
The Event Is Cancelled,
No player receives the message
(Message can still be sent with e.Game.SendToAsync())

Impostor.Api.ImpostorException: Failed to find player that spawned the InnerPlayerControl

Bug Report

Base Information

  • Operating System Windows 10
  • Imposter Version Commit 454f486
  • Among Us Version v2020.10.22s

I confirm:

  • that I have searched for an existing bug report for this issue.

Symptoms

Unable to host a game the first time due to an error, works fine the second time.

Full log (you can see where hosting the first time failed, but the second time worked) https://pastebin.com/8xVBug2Q

Reproduction

  1. Start up Impostor
  2. Attempt to host a game on the latest version (v2020.10.22s)
  3. It will throw the error
  4. Try to host again and it will succeed without throwing any errors

docker-compose.yml and volumes regarding configs/env

Feature Request

Feature Information:

Essentially, I would like to see a bind volume I could just attach for the config.json that would automatically fill it with a default configuration. this way one could actually edit the config while using docker.

either that or perhaps have env variables that can control/replace the config while docker, which may be better

I would also like to see an example docker-compose.yml that has this mount/env and showcases what can be done with it

I confirm:

  • [ + ] that I have searched for an existing feature request matching the description.

Config File must be reloaded at every system boot to set server IP

Bug Report

Base Information

  • Raspberry Pi OS (ARM x86) - Headless
  • Impostor 1.1.0
  • Among Us v2020.9.22s

I confirm:

  • [x ] that I have searched for an existing bug report for this issue.

Symptoms

After rebooting the OS the server external IP address defaults to 127.0.0.1. Opening the config.json in nano and closing it resolves the issue, but it must be done after any reboot.

Reproduction

Reboot the Pi and start the server.

Send game options to specific clients

Api Suggestion

Suggestion

Currently if we want to modify game settings you have to update everyone's settings. We should be able to give different options to different clients.

Use case

Make it so one crewmate has a big vision value and another crewmate has a small vision value.

Expected result

Clients will have different game options.

Catch all events (IEvent or IGameEvent)

Api Suggestion

[EventListener]
public void OnEvent(IEvent e){
    Console.WriteLine(evt.GetType().Name);
}

Suggestion

Creating an event listener to catch every event doesn't work. It's supposed to be used to catch every event that is a subclass. Since every event is a subclass of IEvent, it should have caught all of them. This should also affect interfaces that implement IEvent, and that should be possible if the event caller is reworked to use Type.IsAssignableFrom(Type) in some way.

Use case

Passing events to a scripting engine or custom logger.

Expected result

The expected result is for that event listener to have caught every event, but it simply didn't get called.

Plugin system ideas / expections

The plan is to create a plugin system for Impostor, allowing you to create plugins such as:

  • Auto mute on discord
  • Custom gamemodes (i.e. hide and seek)

You will need to create a C# project (.NET 5 library) and reference the Impostor library. The resulting .dll can be placed in a plugins directory with optionally a directory for the plugin where configs or other data can be stored.

Any ideas / wishes you might have regarding the plugin system can be posted in this issue.

Allow plugins to get a IMessageWriter

Some plugins would prefer to craft their own packets. My idea is to add a IMessageWriterProvider to the serviceprovider which plugins can use through dependency injection.

If a player gets banned for hacking, they can rejoin that lobby after the game is over

Bug Report

Base Information

  • Operating System: Windows 10 Pro 1909 x64
  • Imposter Version: 1.2.0
  • Among Us Version: 9.22

I confirm:

  • that I have searched for an existing bug report for this issue.

Symptoms

You can rejoin the lobby after you get banned from it for hacking

Reproduction

  1. Get banned from that lobby for hacking
  2. Wait for that lobby's game to finish
  3. Rejoin that lobby instead of still being banned

Build a 32-Bit Client

Feature Request

Feature Information:

On other OSes than Windows, the game work on Wine, however the game is also 32 bit, meaning it is a better choice to use it inside a Wine 32bit prefix, however the client binaries doesn't seem available for Windows 32bit

I confirm:

  • that I have searched for an existing feature request matching the description.

I'm guessing it is just a question of changing the target in Visual Studio, it should be pretty easy to do :)

Compile for 32-bit systems?

Feature Request

Compile for 32-bit systems.

Feature Information:

I have an old laptop that runs my webservers and other stuff with ubuntu server 16.04. Many people probably have one of those. Is it possible to run your server on the 32-bit systems?

I confirm:

  • that I have searched for an existing feature request matching the description.

Add an event for the initial connection to the matchmaker.

Api Suggestion

Suggestion

We would like to be able to implement bans based on IP Addresses. For that, we shall need an event that is fired when a client connects to the server, so we can check if he is banned, and terminate his connection before he can request any data.

Use case

Ban systems for cheaters / country heatmapping / DoS detection.

Expected result

An event which shall be fired when a client connects to the server, before any kind of authentication or requests. If the connection shall be terminated inside the event handler, the authentication shall not continue.

Any way to add mods?

Is there a way to add mods to the server?
I want to add the CodeIsNotAmongUs mod by js6pak, anyone knows how to do that ?
(I know my questing is probably dumb, so sorry in advance)

Remove game lobby timeout

Feature Request

Feature Information:

Would be nice to see a config option to disable the lobby timeout so people have more time to join the game

I confirm:

  • that I have searched for an existing feature request matching the description.

Plugins are broken in release builds

Because the release builds use trimming, plugins can't find assemblies they need.

Fix this by disable trimming and self contained for release builds.

Some questions about the among us protocol

Feature Request

Feature Information:

Hey, I'm one of the devs for the among us automute application (https://github.com/denverquane/amongusdiscord). I was wondering if I could talk to you guys about some things regarding the protocol that Among Us uses. This seemed like the easiest way to contact you guys. I want to know if it might be possible (or if you think the possibility might exist), on the network level, to receive game state updates without actually taking up a player spot. For example by false disconnecting or putting the player in an invalid state that will cause them to not take up a player spot anymore.

Thanks in advance!

I confirm:

  • [x ] that I have searched for an existing feature request matching the description.

No Releases

I know its a small issue but no releases are published yet. Would be useful for some lazy people or people who don't know how to compile.

More configuration?

Feature Request

Feature Information:

The ability to configure detailed game settings such as:

  • Max player count
  • no. Impostors
  • etc.

I confirm:

  • that I have searched for an existing feature request matching the description.

Slot limit

Hey, I'd like to bypass 10 players limit. Is it possible to run server with >10 slots using Impostor? Thanks in advance!

Disconnect when trying to join public game

Bug Report

Base Information

  • CentOS 7.8.2003
  • Impostor 1.1.0
  • Among Us v2020.9.9

I confirm:

  • that I have searched for an existing bug report for this issue.

Symptoms

Game gets disconnected when you try to join a public game.

"You disconnected from the server. Reliable packet 1 (size=17) was not ack'd after 7510 ms (9 resends)

Reproduction

  1. Create a game and make it public

  2. From another client click find game

  3. Click the game to try and join it

Host migration bug

When a match is finished and some players have pressed "play again", if the hosts leaves the game gets stuck.

Improve disconnect reliability

Currently we have this in the DisconnectAsync.

await Task.Delay(TimeSpan.FromMilliseconds(250));

It would be better if the error message and the disconnect packet (caused by Connection.DisconnectAsync) were sent as one packet. By doing that, there will be no issue with showing the correct error message in the client.

Find Game Cant Join Public room

Bug Report

Base Information

  • Windows
  • 1.1.0
  • 2020.9.9a

I confirm:

  • [โˆš ] that I have searched for an existing bug report for this issue.

Symptoms

in find game. find a public room . connect . client report Reilable packet 1(size =13) was mpt ack'd after 7505ms(9 resends)

Reproduction

Only craft a room and set public. another client find game. and join

Add instructions on building with docker

Currently docker buildx is required, which is an experimental feature.
It would be good if we had instructions on how to build an image for a specific arch without needing buildx.

Client nonfunctional with Among Us installed on Linux through Steam

The client does not function when attempting to patch a Steam installation of Among Us on Linux, complaining that the Among Us install directory doesn't exist.

I've tried executing the client with both Proton and straight Wine (from within Steam's wineprefix); it otherwise runs fine.

I added a symlink drive_c/users/<username> pointing to drive_c/users/steamuser, suspecting that it was looking at the wrong user directory and thus not finding AppData; this did absolutely nothing, surprisingly.

I have not tested in vanilla Wine completely without Steam as I do not own a DRM-free (itch.io) copy of Among Us.

This could easily be solved by simply adding a manual override for regionInfo.dat's location; this would even allow the client to be run natively with mono on Linux instead of running within Wine.

Allow plugins to send game state changes

Api Suggestion

Suggestion

Plugins should be able to send a packet changing all of the clients game states.

Use case

Having a custom victory / loss scenario. I currently achieve this but setting all clients to Impostor to end the round.

Expected result

Plugins able to set the game state and the clients act accordingly.

Add an event for player death.

Api Suggestion

Suggestion

An event that gets triggered/called whenever a player is killed for any reason. With a DeathReason and the person who got killed, plus the person who caused the kill(an impostor, null if exiled)

Use case

Anti-cheat, custom gamemodes where you might want something special/extra to happen when someone is killed, auto-completing the ghost's tasks once killed(simulating the "GhostsDoTask" setting which as far as I can tell doesn't work)

Expected result

A function that gets called whenever a player is killed, and being able to get the player who got killed and the person responsible(if applicable) along with a death reason.

Building from Source

Feature Request

Feature Information:

Add a real Building from Source section in the Wiki, it would be very helpful

I confirm:

  • that I have searched for an existing feature request matching the description.

Error when trying to install

Bug Report

Base Information

  • operating System: Debian 9
  • Imposter Version: 1.1.0

I confirm:

  • that I have searched for an existing bug report for this issue.

Symptoms

When I try to run dotnet build Impostor.Server on Linux (Debian 9) I get the following error

Microsoft (R) Build Engine version 16.8.0-preview-20475-05+aed5e7ed0 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

/opt/amongus-server/Impostor.Server(1,1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.

Build FAILED.

/opt/amongus-server/Impostor.Server(1,1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.11

dotnet --info output:

root@project-ki:/opt/amongus-server# dotnet --info
.NET SDK (reflecting any global.json):
 Version:   5.0.100-rc.2.20479.15
 Commit:    da7dfa8840

Runtime Environment:
 OS Name:     debian
 OS Version:  9
 OS Platform: Linux
 RID:         debian.9-x64
 Base Path:   /opt/amongus-server/sdk/5.0.100-rc.2.20479.15/

Host (useful for support):
  Version: 5.0.0-rc.2.20475.5
  Commit:  c5a3f49c88

.NET SDKs installed:
  5.0.100-rc.2.20479.15 [/opt/amongus-server/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 5.0.0-rc.2.20475.17 [/opt/amongus-server/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 5.0.0-rc.2.20475.5 [/opt/amongus-server/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

Reproduction

  1. Download Imposter v1.1.0
  2. Download .NET v5.0.0-rc.2.20475.5
  3. Run dotnet build Impostor.Server

I really apologize if I made something wrong but I worked very little with .NET before

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.