Esempio n. 1
0
    def check_network_config(self):
        networkCorrect = ValidateSettings.test_network(
            self.DedicatedServer.settings.PublicIP,
            int(self.DedicatedServer.settings.Port), False)
        if networkCorrect:
            AstroLogging.logPrint("Server network configuration good!")
        else:
            AstroLogging.logPrint(
                "I can't seem to validate your network settings..", "warning")
            AstroLogging.logPrint(
                f"Make sure to Port Forward ({self.DedicatedServer.settings.Port} UDP) and enable NAT Loopback",
                "warning")
            AstroLogging.logPrint("If nobody can connect, Port Forward.",
                                  "warning")
            AstroLogging.logPrint(
                "If others are able to connect, but you aren't, enable NAT Loopback.",
                "warning")

        rconNetworkCorrect = not (ValidateSettings.test_network(
            self.DedicatedServer.settings.PublicIP,
            int(self.DedicatedServer.settings.ConsolePort), True))
        if rconNetworkCorrect:
            AstroLogging.logPrint("Remote Console network configuration good!")
        else:
            AstroLogging.logPrint(
                f"SECURITY ALERT: Your console port ({self.DedicatedServer.settings.ConsolePort}) is Port Forwarded!",
                "warning")
            AstroLogging.logPrint(
                "SECURITY ALERT: This allows anybody to control your server.",
                "warning")
            AstroLogging.logPrint(
                "SECURITY ALERT: Disable this ASAP to prevent issues.",
                "warning")
            time.sleep(5)
Esempio n. 2
0
 def refresh_settings(self):
     self.settings = dataclasses.replace(
         self.settings, **ValidateSettings.get_current_settings(self.astroPath))
     self.ipPortCombo = f'{self.settings.PublicIP}:{self.settings.Port}'
 def refresh_settings(self, ovrIP=False):
     self.settings = dataclasses.replace(
         self.settings, **ValidateSettings.get_current_settings(self.launcher, ovrIP=ovrIP))
     self.ipPortCombo = f'{self.settings.PublicIP}:{self.settings.Port}'