From 17bbe2f368d260ee0a65728b8bb2016905830dd7 Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Thu, 1 Jun 2023 13:47:25 +1000 Subject: [PATCH] Impostor updates (#381) --- impostor.kvp | 9 ++-- impostorconfig.json | 107 +++++++++++++++++++++++++++++++++------- impostormetaconfig.json | 5 ++ impostorupdates.json | 57 ++++++++++++++++++++- 4 files changed, 155 insertions(+), 23 deletions(-) diff --git a/impostor.kvp b/impostor.kvp index b1c2b35..172ecd3 100644 --- a/impostor.kvp +++ b/impostor.kvp @@ -1,7 +1,8 @@ Meta.DisplayName=Impostor - Among Us Server Meta.Description=Impostor Dedicated Server - an open source private server implementation for Among Us Meta.OS=Windows, Linux -Meta.Arch=x86_64 +Meta.AarchSupport=Native +Meta.Arch=All Meta.Author=Greelan Meta.URL=https://github.com/Impostor/Impostor Meta.DisplayImageSource=steam:945360 @@ -41,10 +42,10 @@ App.HasReadableConsole=True App.SupportsLiveSettingsChanges=False App.LiveSettingChangeCommandFormat=set {0} "{1}" App.ApplicationIPBinding=0.0.0.0 -App.Ports=[{"Protocol":"UDP","Port":22023,"Ref":"GamePort","Name":"Game Port","Description":"Port for game traffic"}] +App.Ports=[{"Protocol":"Both","Port":22023,"Ref":"ServerPort","Name":"Game and HTTP Port","Description":"Port for game and HTTP matchmaking traffic"}] App.AdminPortRef=0 -App.PrimaryApplicationPortRef=GamePort -App.UniversalSleepApplicationUDPPortRef=GamePort +App.PrimaryApplicationPortRef=ServerPort +App.UniversalSleepApplicationUDPPortRef=ServerPort App.UniversalSleepSteamQueryPortRef=0 App.MaxUsers=100 App.UseRandomAdminPassword=False diff --git a/impostorconfig.json b/impostorconfig.json index 2f80627..1edf867 100644 --- a/impostorconfig.json +++ b/impostorconfig.json @@ -17,7 +17,7 @@ "Category":"Server Settings", "Description":"", "Keywords":"", - "FieldName":"$GamePort", + "FieldName":"$ServerPort", "InputType":"number", "IsFlagArgument":false, "Hidden":true, @@ -25,6 +25,33 @@ "IncludeInCommandLine":false, "EnumValues":{} }, + { + + "DisplayName":"Listen Port", + "Category":"Server Settings", + "Description":"", + "Keywords":"", + "FieldName":"$ServerPort", + "InputType":"number", + "IsFlagArgument":false, + "Hidden":true, + "ParamFieldName":"$.Server.ListenPort", + "IncludeInCommandLine":false, + "EnumValues":{} + }, + { + "DisplayName":"HTTP Matchmaking Port", + "Category":"Server Settings", + "Description":"", + "Keywords":"", + "FieldName":"$ServerPort", + "InputType":"number", + "IsFlagArgument":false, + "Hidden":true, + "ParamFieldName":"$.HttpServer.ListenPort", + "IncludeInCommandLine":false, + "EnumValues":{} + }, { "DisplayName":"IP Binding", "Category":"Server Settings", @@ -38,23 +65,10 @@ "IncludeInCommandLine":false, "EnumValues":{} }, - { - "DisplayName":"Listen Port", - "Category":"Server Settings", - "Description":"", - "Keywords":"", - "FieldName":"$GamePort", - "InputType":"number", - "IsFlagArgument":false, - "Hidden":true, - "ParamFieldName":"$.Server.ListenPort", - "IncludeInCommandLine":false, - "EnumValues":{} - }, { "DisplayName":"Build Stream", "Category":"Server Settings", - "Description":"Sets the build stream for the server - either the mainline release stream, or the nightly (CI) stream. Back up configuration and update the server!", + "Description":"Sets the build stream for the server - either the mainline release stream, or the nightly (CI) stream. The Server Version also needs to be set. Back up configuration and update the server!", "Keywords":"build,stream", "FieldName":"BuildStream", "InputType":"enum", @@ -96,10 +110,10 @@ "EnumValues":{} }, { - "DisplayName":"Client Configuration", + "DisplayName":"Client and HTTP Matchmaking Configuration", "Category":"Server Settings", - "Description":"For a player to connect to the server, they must [configure their Among Us client](https://impostor.github.io/Impostor/)", - "Keywords":"client,configuration", + "Description":"For a player to connect to the server, they must [configure their Among Us client](https://impostor.github.io/Impostor/). In addition, from late 2022, Among Us requires [HTTP matchmaking](https://github.com/Impostor/Impostor.Http#impostorhttp) for clients to connect. Set the desired HTTP Plugin Version to download, and configure the other Impostor.Http plugin settings as needed", + "Keywords":"client,configuration,http,matchmaking,plugin", "FieldName":"", "InputType":"hidden", "IsFlagArgument":false, @@ -107,6 +121,63 @@ "IncludeInCommandLine":false, "EnumValues":{} }, + { + "DisplayName":"HTTP Plugin Version", + "Category":"Server Settings", + "Description":"Sets the [Impostor.HTTP plugin version](https://github.com/Impostor/Impostor.Http/releases) to install. Update the server!", + "Keywords":"http,matchmaking,plugin,version", + "FieldName":"HttpPluginVersion", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"HttpPluginVersion", + "IncludeInCommandLine":false, + "DefaultValue":"0.4.0", + "Placeholder":"0.4.0", + "EnumValues":{} + }, + { + "DisplayName":"HTTP Matchmaking Plugin Binding", + "Category":"Server Settings", + "Description":"Sets the binding of the Impostor.Http plugin server. Use 0.0.0.0 if clients will connect to the plugin server directly. Otherwise you can use 127.0.0.1 or a local IP on the host, as appropriate, if using a reverse proxy for the plugin server traffic (preferred)", + "Keywords":"http,matchmaking,plugin,binding,listenip", + "FieldName":"HttpServerListenIp", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"$.HttpServer.ListenIp", + "IncludeInCommandLine":false, + "DefaultValue":"0.0.0.0", + "Placeholder":"0.0.0.0", + "EnumValues":{} + }, + { + "DisplayName":"Enable HTTPS For HTTP Matchmaking Plugin", + "Category":"Server Settings", + "Description":"If set, the Impostor.Http plugin server will use its own HTTPS (encrypted HTTP) rather than plain HTTP. Requires the HTTP Matchmaking Plugin Certificate Path to be set. Using a reverse proxy to provide HTTPS is preferred instead of using this setting. Note: HTTPS is required for iOS/Android devices to connect", + "Keywords":"http,matchmaking,plugin,https,secure,usehttps", + "FieldName":"HttpServerUseHttps", + "InputType":"checkbox", + "IsFlagArgument":false, + "ParamFieldName":"$.HttpServer.UseHttps", + "IncludeInCommandLine":false, + "DefaultValue":"false", + "EnumValues":{ + "False":"false", + "True":"true" + } + }, + { + "DisplayName":"HTTP Matchmaking Plugin Certificate Path", + "Category":"Server Settings", + "Description":"Sets the path to an SSL certificate (in PFX format) to enable the Impostor.Http plugin server to use its own HTTPS", + "Keywords":"http,matchmaking,plugin,https,secure,certificate,path,certificatepath", + "FieldName":"HttpServerCertificatePath", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"$.HttpServer.CertificatePath", + "IncludeInCommandLine":false, + "DefaultValue":"", + "EnumValues":{} + }, { "DisplayName":"Enable Anticheat", "Category":"Server Settings", diff --git a/impostormetaconfig.json b/impostormetaconfig.json index dd38b8f..8681949 100644 --- a/impostormetaconfig.json +++ b/impostormetaconfig.json @@ -3,5 +3,10 @@ "ConfigFile":"config.json", "AutoMap":true, "ConfigType":"json" + }, + { + "ConfigFile":"config_http.json", + "AutoMap":true, + "ConfigType":"json" } ] \ No newline at end of file diff --git a/impostorupdates.json b/impostorupdates.json index 11fc2e6..b62b167 100644 --- a/impostorupdates.json +++ b/impostorupdates.json @@ -32,7 +32,18 @@ "UpdateSourcePlatform":"Linux", "UpdateSource":"FetchURL", "UpdateSourceData":"https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/{{DotnetVersion}}/aspnetcore-runtime-{{DotnetVersion}}-linux-x64.tar.gz", - "UpdateSourceTarget":"{{$FullBaseDir}}", + "UpdateSourceArch":"x86_64", + "UpdateSourceTarget":"{{$FullBaseDir}}dotnet", + "UnzipUpdateSource":true, + "OverwriteExistingFiles":true, + "DeleteAfterExtract":true + }, + { + "UpdateStageName":"ASP.NET Core Runtime Download", + "UpdateSourcePlatform":"Linux", + "UpdateSource":"FetchURL", + "UpdateSourceData":"https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/{{DotnetVersion}}/aspnetcore-runtime-{{DotnetVersion}}-linux-arm64.tar.gz", + "UpdateSourceArch":"aarch64", "UpdateSourceTarget":"{{$FullBaseDir}}dotnet", "UnzipUpdateSource":true, "OverwriteExistingFiles":true, @@ -55,6 +66,20 @@ "UpdateSourcePlatform":"Linux", "UpdateSource":"FetchURL", "UpdateSourceData":"https://github.com/Impostor/Impostor/releases/download/v{{ServerVersion}}/Impostor-Server_{{ServerVersion}}_linux-x64.tar.gz", + "UpdateSourceArch":"x86_64", + "UpdateSourceTarget":"{{$FullBaseDir}}", + "UnzipUpdateSource":true, + "OverwriteExistingFiles":true, + "DeleteAfterExtract":true, + "UpdateSourceConditionSetting":"BuildStream", + "UpdateSourceConditionValue":"Release" + }, + { + "UpdateStageName":"Impostor Server Download", + "UpdateSourcePlatform":"Linux", + "UpdateSource":"FetchURL", + "UpdateSourceData":"https://github.com/Impostor/Impostor/releases/download/v{{ServerVersion}}/Impostor-Server_{{ServerVersion}}_linux-arm64.tar.gz", + "UpdateSourceArch":"aarch64", "UpdateSourceTarget":"{{$FullBaseDir}}", "UnzipUpdateSource":true, "OverwriteExistingFiles":true, @@ -79,6 +104,20 @@ "UpdateSourcePlatform":"Linux", "UpdateSource":"FetchURL", "UpdateSourceData":"https://nightly.link/Impostor/Impostor/workflows/ci/master/Impostor-Server_{{ServerVersion}}_linux-x64.zip", + "UpdateSourceArch":"x86_64", + "UpdateSourceTarget":"{{$FullBaseDir}}", + "UnzipUpdateSource":true, + "OverwriteExistingFiles":true, + "DeleteAfterExtract":true, + "UpdateSourceConditionSetting":"BuildStream", + "UpdateSourceConditionValue":"Nightly" + }, + { + "UpdateStageName":"Impostor Server Download", + "UpdateSourcePlatform":"Linux", + "UpdateSource":"FetchURL", + "UpdateSourceData":"https://nightly.link/Impostor/Impostor/workflows/ci/master/Impostor-Server_{{ServerVersion}}_linux-arm64.zip", + "UpdateSourceArch":"aarch64", "UpdateSourceTarget":"{{$FullBaseDir}}", "UnzipUpdateSource":true, "OverwriteExistingFiles":true, @@ -97,5 +136,21 @@ "UpdateSourcePlatform":"Linux", "UpdateSource":"SetExecutableFlag", "UpdateSourceArgs":"{{$FullBaseDir}}Impostor.Server" + }, + { + "UpdateStageName":"Impostor.Http Plugin Download", + "UpdateSourcePlatform":"All", + "UpdateSource":"FetchURL", + "UpdateSourceData":"https://github.com/Impostor/Impostor.Http/releases/download/v{{HttpPluginVersion}}/Impostor.Http.dll", + "UpdateSourceTarget":"{{$FullBaseDir}}plugins", + "OverwriteExistingFiles":true + }, + { + "UpdateStageName":"Impostor.Http Plugin Config File Download", + "UpdateSourcePlatform":"All", + "UpdateSource":"FetchURL", + "UpdateSourceData":"https://raw.githubusercontent.com/Impostor/Impostor.Http/main/config_http.json", + "UpdateSourceTarget":"{{$FullBaseDir}}", + "OverwriteExistingFiles":false } ] \ No newline at end of file