From 32419faf019dae19f1b3e9546f9ba9f232385dbd Mon Sep 17 00:00:00 2001 From: Midorica Date: Fri, 29 Dec 2023 03:20:44 +0000 Subject: [PATCH 01/10] Update docs/game_specific_info.md Removing unused option details for cxb --- docs/game_specific_info.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/game_specific_info.md b/docs/game_specific_info.md index 5810ff8..a06f17f 100644 --- a/docs/game_specific_info.md +++ b/docs/game_specific_info.md @@ -165,15 +165,6 @@ The importer for crossbeats REV. will import Music. Config file is located in `config/cxb.yaml`. -| Option | Info | -| --------------------- | ---------------------------------------------------------- | -| `hostname` | Requires a proper `hostname` (not localhost!) to run | -| `ssl_enable` | Enables/Disables the use of the `ssl_cert` and `ssl_key` | -| `port` | Set your unsecure port number | -| `port_secure` | Set your secure/SSL port number | -| `ssl_cert`, `ssl_key` | Enter your SSL certificate (requires not self signed cert) | - - ## maimai DX ### Versions From 19baf05d7bb19971dcae189388cda1c114146a4d Mon Sep 17 00:00:00 2001 From: Midorica Date: Fri, 29 Dec 2023 13:59:53 -0500 Subject: [PATCH 02/10] cxb: fixing get_allnet_info --- titles/cxb/index.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/titles/cxb/index.py b/titles/cxb/index.py index af728c6..04bbc92 100644 --- a/titles/cxb/index.py +++ b/titles/cxb/index.py @@ -76,13 +76,21 @@ class CxbServlet(BaseServlet): return True def get_allnet_info(self, game_code: str, game_ver: int, keychip: str) -> Tuple[str, str]: - if not self.core_cfg.server.is_using_proxy and Utils.get_title_port_ssl(self.core_cfg): - return ( - f"https://{self.core_cfg.title.hostname}:{self.core_cfg.title.port_ssl}", - "", - ) + title_port_int = Utils.get_title_port(self.core_cfg) + title_port_ssl_int = Utils.get_title_port_ssl(self.core_cfg) + + proto = "https" if title_port_ssl_int != 443 else "http" - return (f"https://{self.core_cfg.title.hostname}", "") + if proto == "https": + t_port = f":{title_port_ssl_int}" if title_port_ssl_int and not self.core_cfg.server.is_using_proxy else "" + + else: + t_port = f":{title_port_int}" if title_port_int and not self.core_cfg.server.is_using_proxy else "" + + return ( + f"{proto}://{self.core_cfg.title.hostname}{t_port}", + "", + ) def get_endpoint_matchers(self) -> Tuple[List[Tuple[str, str, Dict]], List[Tuple[str, str, Dict]]]: return ( From 5f33b2d3e48336c78f74d996e07cda15a6c2231b Mon Sep 17 00:00:00 2001 From: Kumubou Date: Wed, 3 Jan 2024 22:05:24 +0000 Subject: [PATCH 03/10] Fix issue in handle_get_user_music_api_request where songs would not always return all scores --- titles/chuni/base.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/titles/chuni/base.py b/titles/chuni/base.py index 674fb9c..8d22488 100644 --- a/titles/chuni/base.py +++ b/titles/chuni/base.py @@ -608,16 +608,14 @@ class ChuniBase: if len(song_list) >= max_ct: break - try: - while song_list[-1]["userMusicDetailList"][0]["musicId"] == music_detail[x + 1]["musicId"]: - music = music_detail[x + 1]._asdict() - music.pop("user") - music.pop("id") - song_list[-1]["userMusicDetailList"].append(music) - song_list[-1]["length"] += 1 - x += 1 - except IndexError: - pass + for songIdx in range(len(song_list)): + for recordIdx in range(x+1, len(music_detail)): + if song_list[songIdx]["userMusicDetailList"][0]["musicId"] == music_detail[recordIdx]["musicId"]: + music = music_detail[recordIdx]._asdict() + music.pop("user") + music.pop("id") + song_list[songIdx]["userMusicDetailList"].append(music) + song_list[songIdx]["length"] += 1 if len(song_list) >= max_ct: next_idx += len(song_list) From 343424e26a8dc9d3395933bb69f9c1b015dc41c4 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Mon, 8 Jan 2024 18:00:06 -0500 Subject: [PATCH 04/10] update changelog --- changelog.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 69 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index 9ad97c5..406d78a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,14 +1,39 @@ # Changelog Documenting updates to ARTEMiS, to be updated every time the master branch is pushed to. -## 20231015 +## 20XXXXXX +### System ++ Change how the underlying system handles URLs + + This can now allow for things like version-specific, or even keychip-specific URLs + + Specific changes to games are noted below ++ Fix docker files [#60](https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/60) (Thanks Rylie!) ++ Fix support for python 3.8 - 3.10 + +### Aimedb ++ Add support for SegaAuth key in games that support it (for now only Chunithm) + + This is a JWT that is sent to games, by Aimedb, that the games send to their game server, to verify that the access code the game is sending to the server was obtained via aimedb. + + Requires a base64-encoded secret to be set in the `core.yaml` + +### Chunithm ++ Fix Air support ++ Add saving for userRecentPlayerList ++ Add support for SegaAuthKey ++ Fix a bug arising if a user set their name to be 'true' or 'false' ++ Add support for Sun+ [#78](https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/78) (Thanks EmmyHeart!) ### maimai DX -+ Added support for FESTiVAL PLUS ++ Fix user charges failing to save -### Card Maker -+ Added support for maimai DX FESTiVAL PLUS +### maimai ++ Made it functional + +### CXB ++ Improvements to request dispatching ++ Add support for non-omnimix music lists + + +### IDZ ++ Fix news urls in accordance with the system change to URLs -## 20231001 ### Initial D THE ARCADE + Added support for Initial D THE ARCADE S2 + Story mode progress added @@ -20,6 +45,45 @@ Documenting updates to ARTEMiS, to be updated every time the master branch is pu + Frontend to download profile added + Importer to import profiles added +### ONGEKI ++ Now supports HTTPS on a per-version basis ++ Merg PR [#61](https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/61) (Thanks phantomlan!) + + Add Ranking Event Support + + Add reward list support + + Add version segregation to Event Ranking, Tech Challenge, and Music Ranking + + Now stores ClientTestmode and ClientSetting data ++ Fix mission points not adding correctly [#68](https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/68) (Thanks phantomlan!) ++ Fix tech challenge [#70](https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/70) (Thanks phantomlan!) + +### SAO ++ Change endpoint in accordance with the system change to URLs ++ Update request header class to be more accurate ++ Encrypted requests are now supported ++ Change to using handler classes instead of raw structs for simplicity + +### Wacca ++ Fix a server error causing a seperate error that casued issues ++ Add better error printing ++ Add better request validation ++ Fix HousingStartV2 ++ Fix Lily's housing/get handler + +## 20231107 +### CXB ++ Hotfix `render_POST` sometimes failing to read the request body on large requests + +## 20231106 +### CXB ++ Hotfix `render_POST` function signature signature ++ Hotfix `handle_action_addenergy_request` hard failing if `get_energy` returns None + +## 20231015 +### maimai DX ++ Added support for FESTiVAL PLUS + +### Card Maker ++ Added support for maimai DX FESTiVAL PLUS + ## 20230716 ### General + Docker files added (#19) From 27bf51f9f8bf6378b348c8b39db237ecf861c0c3 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Mon, 8 Jan 2024 18:22:09 -0500 Subject: [PATCH 05/10] chuni: add matching config, stun turn stuff --- example_config/chuni.yaml | 9 ++++++++- titles/chuni/config.py | 34 ++++++++++++++++++++++++++++++++++ titles/chuni/new.py | 15 +++++++++------ 3 files changed, 51 insertions(+), 7 deletions(-) diff --git a/example_config/chuni.yaml b/example_config/chuni.yaml index 72a1d98..2b3ae98 100644 --- a/example_config/chuni.yaml +++ b/example_config/chuni.yaml @@ -24,4 +24,11 @@ version: data: 2.15.00 crypto: - encrypted_only: False \ No newline at end of file + encrypted_only: False + +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 05cc8ad..55689c8 100644 --- a/titles/chuni/config.py +++ b/titles/chuni/config.py @@ -89,6 +89,39 @@ class ChuniCryptoConfig: self.__config, "chuni", "crypto", "encrypted_only", default=False ) +class ChuniMatchingConfig: + def __init__(self, parent_config: "ChuniConfig") -> None: + self.__config = parent_config + + @property + def enable(self) -> bool: + return CoreConfig.get_config_field( + 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( + self.__config, "chuni", "matching", "match_time_limit", default=60 + ) + + @property + def match_error_limit(self) -> int: + return CoreConfig.get_config_field( + self.__config, "chuni", "matching", "match_error_limit", default=9999 + ) class ChuniConfig(dict): def __init__(self) -> None: @@ -97,3 +130,4 @@ class ChuniConfig(dict): self.mods = ChuniModsConfig(self) self.version = ChuniVersionConfig(self) self.crypto = ChuniCryptoConfig(self) + self.matching = ChuniMatchingConfig(self) diff --git a/titles/chuni/new.py b/titles/chuni/new.py index 8a658bf..86a7b08 100644 --- a/titles/chuni/new.py +++ b/titles/chuni/new.py @@ -5,6 +5,7 @@ from typing import Dict import pytz from core.config import CoreConfig +from core.utils import Utils from titles.chuni.const import ChuniConstants from titles.chuni.database import ChuniData from titles.chuni.base import ChuniBase @@ -55,6 +56,7 @@ class ChuniNew(ChuniBase): # create strings for use in gameSetting reboot_start = reboot_start_time.strftime(self.date_time_format) reboot_end = reboot_end_time.strftime(self.date_time_format) + t_port = Utils.get_title_port(self.core_cfg) return { "gameSetting": { "isMaintenance": False, @@ -67,15 +69,16 @@ class ChuniNew(ChuniBase): "maxCountMusic": 300, "matchStartTime": match_start, "matchEndTime": match_end, - "matchTimeLimit": 60, - "matchErrorLimit": 9999, + "matchTimeLimit": self.game_cfg.matching.match_time_limit, + "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}:{self.core_cfg.title.port}/SDHD/200/ChuniServlet/", - "matchingUriX": f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/200/ChuniServlet/", + "matchingUri": f"http://{self.core_cfg.title.hostname}:{t_port}/SDHD/200/ChuniServlet/" if self.game_cfg.matching.enable else "", + "matchingUriX": f"http://{self.core_cfg.title.hostname}:{t_port}/SDHD/200/ChuniServlet/" if self.game_cfg.matching.enable else "", # might be really important for online battle to connect the cabs via UDP port 50201 - "udpHolePunchUri": f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/200/ChuniServlet/", - "reflectorUri": f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/200/ChuniServlet/", + # 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 "", }, "isDumpUpload": False, "isAou": False, From f5c77f04fa8f918fb508b8c307525891e8ae29b1 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Mon, 8 Jan 2024 18:23:15 -0500 Subject: [PATCH 06/10] update changelog --- changelog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/changelog.md b/changelog.md index 406d78a..1e6c207 100644 --- a/changelog.md +++ b/changelog.md @@ -20,6 +20,9 @@ Documenting updates to ARTEMiS, to be updated every time the master branch is pu + Add support for SegaAuthKey + Fix a bug arising if a user set their name to be 'true' or 'false' + Add support for Sun+ [#78](https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/78) (Thanks EmmyHeart!) ++ Add `matching` section to `chuni.yaml` ++ Change `udpHolePunchUri` and `reflectorUri` to be STUN and TURN servers + ### maimai DX + Fix user charges failing to save From 1b3e43b9181508162d3ff6d1701042f301931a64 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Mon, 8 Jan 2024 18:30:03 -0500 Subject: [PATCH 07/10] chuni: Imrpove `GetGameSetting` request handling for different versions --- changelog.md | 1 + titles/chuni/new.py | 15 ++++++++++++--- titles/chuni/newplus.py | 24 +----------------------- titles/chuni/sun.py | 18 ------------------ titles/chuni/sunplus.py | 18 ------------------ 5 files changed, 14 insertions(+), 62 deletions(-) diff --git a/changelog.md b/changelog.md index 1e6c207..914dd5c 100644 --- a/changelog.md +++ b/changelog.md @@ -22,6 +22,7 @@ Documenting updates to ARTEMiS, to be updated every time the master branch is pu + Add support for Sun+ [#78](https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/78) (Thanks EmmyHeart!) + Add `matching` section to `chuni.yaml` + Change `udpHolePunchUri` and `reflectorUri` to be STUN and TURN servers ++ Imrpove `GetGameSetting` request handling for different versions ### maimai DX + Fix user charges failing to save diff --git a/titles/chuni/new.py b/titles/chuni/new.py index 86a7b08..15bef13 100644 --- a/titles/chuni/new.py +++ b/titles/chuni/new.py @@ -11,7 +11,6 @@ from titles.chuni.database import ChuniData from titles.chuni.base import ChuniBase from titles.chuni.config import ChuniConfig - class ChuniNew(ChuniBase): ITEM_TYPE = {"character": 20, "story": 21, "card": 22} @@ -23,6 +22,16 @@ class ChuniNew(ChuniBase): self.logger = logging.getLogger("chuni") self.game = ChuniConstants.GAME_CODE self.version = ChuniConstants.VER_CHUNITHM_NEW + + def _interal_ver_to_intver(self) -> str: + if self.version == ChuniConstants.VER_CHUNITHM_NEW: + return "200" + if self.version == ChuniConstants.VER_CHUNITHM_NEW_PLUS: + return "205" + if self.version == ChuniConstants.VER_CHUNITHM_SUN: + return "210" + if self.version == ChuniConstants.VER_CHUNITHM_SUN_PLUS: + return "215" def handle_get_game_setting_api_request(self, data: Dict) -> Dict: # use UTC time and convert it to JST time by adding +9 @@ -73,8 +82,8 @@ 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/200/ChuniServlet/" if self.game_cfg.matching.enable else "", - "matchingUriX": f"http://{self.core_cfg.title.hostname}:{t_port}/SDHD/200/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/" 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 "", # 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 "", diff --git a/titles/chuni/newplus.py b/titles/chuni/newplus.py index 749173c..fa642d3 100644 --- a/titles/chuni/newplus.py +++ b/titles/chuni/newplus.py @@ -1,38 +1,16 @@ from typing import Dict, Any +from core.utils import Utils from core.config import CoreConfig from titles.chuni.new import ChuniNew from titles.chuni.const import ChuniConstants from titles.chuni.config import ChuniConfig - class ChuniNewPlus(ChuniNew): def __init__(self, core_cfg: CoreConfig, game_cfg: ChuniConfig) -> None: super().__init__(core_cfg, game_cfg) self.version = ChuniConstants.VER_CHUNITHM_NEW_PLUS - def handle_get_game_setting_api_request(self, data: Dict) -> Dict: - ret = super().handle_get_game_setting_api_request(data) - ret["gameSetting"]["romVersion"] = self.game_cfg.version.version(self.version)[ - "rom" - ] - ret["gameSetting"]["dataVersion"] = self.game_cfg.version.version(self.version)[ - "data" - ] - ret["gameSetting"][ - "matchingUri" - ] = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/205/ChuniServlet/" - ret["gameSetting"][ - "matchingUriX" - ] = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/205/ChuniServlet/" - ret["gameSetting"][ - "udpHolePunchUri" - ] = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/205/ChuniServlet/" - ret["gameSetting"][ - "reflectorUri" - ] = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/205/ChuniServlet/" - return ret - def handle_cm_get_user_preview_api_request(self, data: Dict) -> Dict: user_data = super().handle_cm_get_user_preview_api_request(data) diff --git a/titles/chuni/sun.py b/titles/chuni/sun.py index 9a82a65..bfefd97 100644 --- a/titles/chuni/sun.py +++ b/titles/chuni/sun.py @@ -11,24 +11,6 @@ class ChuniSun(ChuniNewPlus): super().__init__(core_cfg, game_cfg) self.version = ChuniConstants.VER_CHUNITHM_SUN - def handle_get_game_setting_api_request(self, data: Dict) -> Dict: - ret = super().handle_get_game_setting_api_request(data) - ret["gameSetting"]["romVersion"] = self.game_cfg.version.version(self.version)["rom"] - ret["gameSetting"]["dataVersion"] = self.game_cfg.version.version(self.version)["data"] - ret["gameSetting"][ - "matchingUri" - ] = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/210/ChuniServlet/" - ret["gameSetting"][ - "matchingUriX" - ] = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/210/ChuniServlet/" - ret["gameSetting"][ - "udpHolePunchUri" - ] = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/210/ChuniServlet/" - ret["gameSetting"][ - "reflectorUri" - ] = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/210/ChuniServlet/" - return ret - def handle_cm_get_user_preview_api_request(self, data: Dict) -> Dict: user_data = super().handle_cm_get_user_preview_api_request(data) diff --git a/titles/chuni/sunplus.py b/titles/chuni/sunplus.py index 66a7f3b..fc86314 100644 --- a/titles/chuni/sunplus.py +++ b/titles/chuni/sunplus.py @@ -11,24 +11,6 @@ class ChuniSunPlus(ChuniSun): super().__init__(core_cfg, game_cfg) self.version = ChuniConstants.VER_CHUNITHM_SUN_PLUS - def handle_get_game_setting_api_request(self, data: Dict) -> Dict: - ret = super().handle_get_game_setting_api_request(data) - ret["gameSetting"]["romVersion"] = self.game_cfg.version.version(self.version)["rom"] - ret["gameSetting"]["dataVersion"] = self.game_cfg.version.version(self.version)["data"] - ret["gameSetting"][ - "matchingUri" - ] = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/215/ChuniServlet/" - ret["gameSetting"][ - "matchingUriX" - ] = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/215/ChuniServlet/" - ret["gameSetting"][ - "udpHolePunchUri" - ] = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/215/ChuniServlet/" - ret["gameSetting"][ - "reflectorUri" - ] = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/215/ChuniServlet/" - return ret - def handle_cm_get_user_preview_api_request(self, data: Dict) -> Dict: user_data = super().handle_cm_get_user_preview_api_request(data) From b4b40869c1cc8338f914ca8f0c9e118f05bbf5cb Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Mon, 8 Jan 2024 20:21:27 -0500 Subject: [PATCH 08/10] chuni: add roomId to handle_get_matching_state_api_request, update changelog --- changelog.md | 1 + titles/chuni/new.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 914dd5c..c12bbce 100644 --- a/changelog.md +++ b/changelog.md @@ -23,6 +23,7 @@ Documenting updates to ARTEMiS, to be updated every time the master branch is pu + Add `matching` section to `chuni.yaml` + Change `udpHolePunchUri` and `reflectorUri` to be STUN and TURN servers + Imrpove `GetGameSetting` request handling for different versions ++ Fix issue where songs would not always return all scores [#92](https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/92) (Thanks Kumubou!) ### maimai DX + Fix user charges failing to save diff --git a/titles/chuni/new.py b/titles/chuni/new.py index 15bef13..208f3b1 100644 --- a/titles/chuni/new.py +++ b/titles/chuni/new.py @@ -659,4 +659,7 @@ class ChuniNew(ChuniBase): "matchingMemberInfoList": [current_member] + diff_members, } - return {"matchingWaitState": matching_wait} + return { + "roomId": data["roomId"], + "matchingWaitState": matching_wait + } From 01591a045626b2078168151c12172f006ac1d874 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Mon, 8 Jan 2024 21:23:10 -0500 Subject: [PATCH 09/10] 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, From b056ff218dadeab3c22c63f89376edc8ebb4672e Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Mon, 8 Jan 2024 21:25:45 -0500 Subject: [PATCH 10/10] Update changelog --- changelog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index c12bbce..3fc6125 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,7 @@ # Changelog Documenting updates to ARTEMiS, to be updated every time the master branch is pushed to. -## 20XXXXXX +## 20240108 ### System + Change how the underlying system handles URLs + This can now allow for things like version-specific, or even keychip-specific URLs @@ -21,7 +21,7 @@ Documenting updates to ARTEMiS, to be updated every time the master branch is pu + Fix a bug arising if a user set their name to be 'true' or 'false' + Add support for Sun+ [#78](https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/78) (Thanks EmmyHeart!) + Add `matching` section to `chuni.yaml` -+ Change `udpHolePunchUri` and `reflectorUri` to be STUN and TURN servers ++ ~~Change `udpHolePunchUri` and `reflectorUri` to be STUN and TURN servers~~ Reverted + Imrpove `GetGameSetting` request handling for different versions + Fix issue where songs would not always return all scores [#92](https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/92) (Thanks Kumubou!)