From 01591a045626b2078168151c12172f006ac1d874 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Mon, 8 Jan 2024 21:23:10 -0500 Subject: [PATCH] chuni: revert changes to udpHolePunchUri and reflectorUri --- example_config/chuni.yaml | 2 -- titles/chuni/config.py | 12 ------------ titles/chuni/new.py | 9 ++++----- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/example_config/chuni.yaml b/example_config/chuni.yaml index 2b3ae98..53da186 100644 --- a/example_config/chuni.yaml +++ b/example_config/chuni.yaml @@ -28,7 +28,5 @@ crypto: matching: enable: False - stun_uri: "stun:stunserver.stunprotocol.org:3478" - turn_uri: "turn:stunserver.stunprotocol.org:3478" match_time_limit: 60 match_error_limit: 9999 diff --git a/titles/chuni/config.py b/titles/chuni/config.py index 55689c8..72329ec 100644 --- a/titles/chuni/config.py +++ b/titles/chuni/config.py @@ -99,18 +99,6 @@ class ChuniMatchingConfig: self.__config, "chuni", "matching", "enable", default=False ) - @property - def stun_uri(self) -> str: - return CoreConfig.get_config_field( - self.__config, "chuni", "matching", "stun_uri", default="stun:stunserver.stunprotocol.org:3478" - ) - - @property - def turn_uri(self) -> str: - return CoreConfig.get_config_field( - self.__config, "chuni", "matching", "turn_uri", default="turn:stunserver.stunprotocol.org:3478" - ) - @property def match_time_limit(self) -> int: return CoreConfig.get_config_field( diff --git a/titles/chuni/new.py b/titles/chuni/new.py index 208f3b1..d8a71b1 100644 --- a/titles/chuni/new.py +++ b/titles/chuni/new.py @@ -82,12 +82,11 @@ class ChuniNew(ChuniBase): "matchErrorLimit": self.game_cfg.matching.match_error_limit, "romVersion": self.game_cfg.version.version(self.version)["rom"], "dataVersion": self.game_cfg.version.version(self.version)["data"], - "matchingUri": f"http://{self.core_cfg.title.hostname}:{t_port}/SDHD/{self._interal_ver_to_intver()}/ChuniServlet/" if self.game_cfg.matching.enable else "", - "matchingUriX": f"http://{self.core_cfg.title.hostname}:{t_port}/SDHD/{self._interal_ver_to_intver()}/ChuniServlet/" if self.game_cfg.matching.enable else "", + "matchingUri": f"http://{self.core_cfg.title.hostname}:{t_port}/SDHD/{self._interal_ver_to_intver()}/ChuniServlet/", + "matchingUriX": f"http://{self.core_cfg.title.hostname}:{t_port}/SDHD/{self._interal_ver_to_intver()}/ChuniServlet/", # might be really important for online battle to connect the cabs via UDP port 50201 - # Hay1tsme 01/08/2023: Pretty sure this is a stun and turn server respectivly... - "udpHolePunchUri": self.game_cfg.matching.stun_uri if self.game_cfg.matching.enable else "", - "reflectorUri": self.game_cfg.matching.turn_uri if self.game_cfg.matching.enable else "", + "udpHolePunchUri": f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/{self._interal_ver_to_intver()}/ChuniServlet/", + "reflectorUri": f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/{self._interal_ver_to_intver()}/ChuniServlet/", }, "isDumpUpload": False, "isAou": False,