From: miniduikboot Date: Sun, 29 Jan 2023 23:10:55 +0000 (+0100) Subject: Add a warning for using the default PublicIp X-Git-Tag: v1.8.1~2 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=1521410e79bcef9605a51c41ab007bfe43f48466;p=rhonda%2Fimpostor.git Add a warning for using the default PublicIp This is a misconfiguration in most cases and it breaks Impostor.Http. Throw a warning so that people know that they should return to the install instructions. --- diff --git a/src/Impostor.Server/Net/MatchmakerService.cs b/src/Impostor.Server/Net/MatchmakerService.cs index 6973ba3..f76663c 100644 --- a/src/Impostor.Server/Net/MatchmakerService.cs +++ b/src/Impostor.Server/Net/MatchmakerService.cs @@ -36,6 +36,14 @@ namespace Impostor.Server.Net endpoint.Port, _serverConfig.ResolvePublicIp(), _serverConfig.PublicPort); + + // NOTE: If this warning annoys you, set your PublicIp to "localhost" + if (_serverConfig.PublicIp == "127.0.0.1") + { + _logger.LogWarning("Your PublicIp is set to the default value of 127.0.0.1."); + _logger.LogWarning("To allow people on other devices to connect to your server, change this value to your Public IP address"); + _logger.LogWarning("For more info on how to do this see https://github.com/Impostor/Impostor/blob/master/docs/Server-configuration.md"); + } } public async Task StopAsync(CancellationToken cancellationToken)