Add AOU-EU Server

This commit is contained in:
Gurge44 committed 2026-08-15 13:49:30 +02:00
1 parent 88a3cf8271
commit e31d1c459d
5 files changed
+23 -15

No files matched your search

+3 -8
View File
@@ -985,14 +985,9 @@ static class PreventLargePacketKickPatch
{
if (msg.Length <= 1200) return true;
var serverType = GameStates.CurrentServerType;
if (AmongUsClient.Instance.AmHost && GameStates.CurrentServerType is GameStates.ServerType.Niko or GameStates.ServerType.Modded) return true;
if (!AmongUsClient.Instance.AmHost || serverType is GameStates.ServerType.Local or GameStates.ServerType.Vanilla || (serverType == GameStates.ServerType.Niko && !AmongUsClient.Instance.AmHost))
{
Logger.Warn($" Blocked large packet from sending (size: {msg.Length})", nameof(PreventLargePacketKickPatch));
return false;
}
return true;
Logger.Warn($" Blocked large packet from sending (size: {msg.Length})", nameof(PreventLargePacketKickPatch));
return false;
}
}
+7 -2
View File
@@ -575,6 +575,7 @@ public static class GameStates
Vanilla,
Modded,
Niko,
AOU,
Local,
Custom
}
@@ -608,7 +609,9 @@ public static class GameStates
"Local Game" => ServerType.Custom,
"EU" or "NA" or "AS" => ServerType.Vanilla,
"MEU" or "MAS" or "MNA" => ServerType.Modded,
_ => regionName.Contains("Niko", StringComparison.OrdinalIgnoreCase) ? ServerType.Niko : ServerType.Custom
_ when regionName.Contains("Niko", StringComparison.OrdinalIgnoreCase) => ServerType.Niko,
_ when regionName.StartsWith("AOU", StringComparison.OrdinalIgnoreCase) => ServerType.AOU,
_ => ServerType.Custom
};
}
}
@@ -625,7 +628,9 @@ public static class GameStates
"Local Game" => ServerType.Custom,
"EU" or "NA" or "AS" => ServerType.Vanilla,
"MEU" or "MAS" or "MNA" => ServerType.Modded,
_ => regionName.Contains("Niko", StringComparison.OrdinalIgnoreCase) ? ServerType.Niko : ServerType.Custom
_ when regionName.Contains("Niko", StringComparison.OrdinalIgnoreCase) => ServerType.Niko,
_ when regionName.StartsWith("AOU", StringComparison.OrdinalIgnoreCase) => ServerType.AOU,
_ => ServerType.Custom
};
}
}
+9 -2
View File
@@ -1880,7 +1880,8 @@ public static class Utils
text = text.Replace("color=#", "#");
title = title.Replace("color=", string.Empty);
bool vanilla = GameStates.CurrentServerType == GameStates.ServerType.Vanilla;
var serverType = GameStates.CurrentServerType;
bool vanilla = serverType == GameStates.ServerType.Vanilla;
SendOption sendOption = SendOption.Reliable;
@@ -2010,7 +2011,7 @@ public static class Utils
// ============================================================================
int fullRpcSizeLimit = Options.MessageRpcSizeLimit.GetInt();
if (vanilla && fullRpcSizeLimit > 1200) fullRpcSizeLimit = 1200;
if ((vanilla || serverType == GameStates.ServerType.AOU) && fullRpcSizeLimit > 1200) fullRpcSizeLimit = 1200;
string resetName = Main.AllPlayerNames.GetValueOrDefault(sender.PlayerId, string.Empty);
@@ -5110,6 +5111,12 @@ public static class Utils
return name;
}
if (ip.Contains("allofus"))
{
name = $"AOU-{ip.Split('.')[0].ToUpper()}";
return name;
}
if (name.Contains("Niko", StringComparison.OrdinalIgnoreCase))
name = name.Replace("233(", "-").Replace("233 (", "-").TrimEnd(')');
+3 -2
View File
@@ -347,8 +347,9 @@ internal static class Crowded
{
public static void Prefix()
{
Logger.Info($"Host Game is being called! Region: {CurrentServerTypeInCreateMenu}", "CreateGameOptions");
if (CurrentServerTypeInCreateMenu != ServerType.Vanilla) return;
ServerType serverTypeInCreateMenu = CurrentServerTypeInCreateMenu;
Logger.Info($"Host Game is being called! Region: {serverTypeInCreateMenu}", "CreateGameOptions");
if (serverTypeInCreateMenu != ServerType.Vanilla) return;
var GameHostOptions = GameOptionsManager.Instance.GameHostOptions;
var CurrentGameOptions = GameOptionsManager.Instance.CurrentGameOptions;
@@ -6,7 +6,7 @@
## Create an array of regions you want to add/update. To create this array, go to https://impostor.github.io/Impostor/ and put the Regions array from the server file in here
# Setting type: String
# Default value: {\"CurrentRegionIdx\":0,\"Regions\":[]}
Regions = { \"CurrentRegionIdx\": 2, \"Regions\": [ { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Niko-NA\", \"PingServer\": \"https://au-us.niko233.top\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://au-us.niko233.top\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Niko-AS\", \"PingServer\": \"https://au-as.niko233.top\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://au-as.niko233.top\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Niko-EU\", \"PingServer\": \"https://au-eu.niko233.top\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://au-eu.niko233.top\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded EU (MEU)\", \"PingServer\": \"https://au-eu.duikbo.at\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://au-eu.duikbo.at\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded NA (MNA)\", \"PingServer\": \"https://aumods.org\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://aumods.org\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded Asia (MAS)\", \"PingServer\": \"https://au-as.duikbo.at\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://au-as.duikbo.at\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 } ] }
Regions = { \"CurrentRegionIdx\": 2, \"Regions\": [ { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"AOU-EU\", \"PingServer\": \"https://eu.allofus.dev\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://eu.allofus.dev\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Niko-NA\", \"PingServer\": \"https://au-us.niko233.top\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://au-us.niko233.top\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Niko-AS\", \"PingServer\": \"https://au-as.niko233.top\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://au-as.niko233.top\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Niko-EU\", \"PingServer\": \"https://au-eu.niko233.top\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://au-eu.niko233.top\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded EU (MEU)\", \"PingServer\": \"https://au-eu.duikbo.at\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://au-eu.duikbo.at\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded NA (MNA)\", \"PingServer\": \"https://aumods.org\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://aumods.org\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded Asia (MAS)\", \"PingServer\": \"https://au-as.duikbo.at\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://au-as.duikbo.at\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 } ] }
## Comma-seperated list of region names that should be removed.
# Setting type: String