chuni: revert changes to udpHolePunchUri and reflectorUri

This commit is contained in:
Hay1tsme 2024-01-08 21:23:10 -05:00
parent b4b40869c1
commit 01591a0456
3 changed files with 4 additions and 19 deletions

View File

@ -28,7 +28,5 @@ crypto:
matching: matching:
enable: False enable: False
stun_uri: "stun:stunserver.stunprotocol.org:3478"
turn_uri: "turn:stunserver.stunprotocol.org:3478"
match_time_limit: 60 match_time_limit: 60
match_error_limit: 9999 match_error_limit: 9999

View File

@ -99,18 +99,6 @@ class ChuniMatchingConfig:
self.__config, "chuni", "matching", "enable", default=False 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 @property
def match_time_limit(self) -> int: def match_time_limit(self) -> int:
return CoreConfig.get_config_field( return CoreConfig.get_config_field(

View File

@ -82,12 +82,11 @@ class ChuniNew(ChuniBase):
"matchErrorLimit": self.game_cfg.matching.match_error_limit, "matchErrorLimit": self.game_cfg.matching.match_error_limit,
"romVersion": self.game_cfg.version.version(self.version)["rom"], "romVersion": self.game_cfg.version.version(self.version)["rom"],
"dataVersion": self.game_cfg.version.version(self.version)["data"], "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 "", "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/" if self.game_cfg.matching.enable else "", "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 # 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": f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/{self._interal_ver_to_intver()}/ChuniServlet/",
"udpHolePunchUri": self.game_cfg.matching.stun_uri if self.game_cfg.matching.enable else "", "reflectorUri": f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/{self._interal_ver_to_intver()}/ChuniServlet/",
"reflectorUri": self.game_cfg.matching.turn_uri if self.game_cfg.matching.enable else "",
}, },
"isDumpUpload": False, "isDumpUpload": False,
"isAou": False, "isAou": False,