From 7b0872aeccc2be460e8af5cd4a14b0660a83c1ed Mon Sep 17 00:00:00 2001 From: Ethan Jones Date: Thu, 23 Sep 2021 14:09:52 -0600 Subject: BungeeGuard style proxy security and OnlyAllowBungee config (#5291) --- src/Server.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Server.cpp') diff --git a/src/Server.cpp b/src/Server.cpp index f70c0d092..8be63c083 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -192,11 +192,19 @@ bool cServer::InitServer(cSettingsRepositoryInterface & a_Settings, bool a_Shoul // Check if both BungeeCord and online mode are on, if so, warn the admin: m_ShouldAllowBungeeCord = a_Settings.GetValueSetB("Authentication", "AllowBungeeCord", false); + m_OnlyAllowBungeeCord = a_Settings.GetValueSetB("Authentication", "OnlyAllowBungeeCord", false); + m_ProxySharedSecret = a_Settings.GetValueSet("Authentication", "ProxySharedSecret", ""); + if (m_ShouldAllowBungeeCord && m_ShouldAuthenticate) { LOGWARNING("WARNING: BungeeCord is allowed and server set to online mode. This is unsafe and will not work properly. Disable either authentication or BungeeCord in settings.ini."); } + if (m_ShouldAllowBungeeCord && m_ProxySharedSecret.empty()) + { + LOGWARNING("WARNING: There is not a Proxy Forward Secret set up, and any proxy server can forward a player to this server unless closed from the internet."); + } + m_ShouldAllowMultiWorldTabCompletion = a_Settings.GetValueSetB("Server", "AllowMultiWorldTabCompletion", true); m_ShouldLimitPlayerBlockChanges = a_Settings.GetValueSetB("AntiCheat", "LimitPlayerBlockChanges", true); -- cgit v1.2.3