From c93db035f318ad9f4775015a071b2df0f178204c Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Sat, 6 Jul 2024 11:08:41 +0700 Subject: [PATCH] Update ICE candidates --- src/utils/network.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/network.ts b/src/utils/network.ts index f316a00..48c0b8e 100644 --- a/src/utils/network.ts +++ b/src/utils/network.ts @@ -10,6 +10,7 @@ import { getPreferredServerRegion } from "@utils/region"; import { GamePassCloudGallery } from "../enums/game-pass-gallery"; import { InputType } from "./bx-exposed"; import { FeatureGates } from "./feature-gates"; +import { BxLogger } from "./bx-logger"; enum RequestType { XCLOUD = 'xcloud', @@ -95,7 +96,7 @@ function updateIceCandidates(candidates: any, options: any) { newCandidates.push(newCandidate('a=end-of-candidates')); - console.log(newCandidates); + BxLogger.info('ICE Candidates', newCandidates); return newCandidates; } @@ -157,6 +158,10 @@ class XhomeInterceptor { console.log(obj); const serverDetails = obj.serverDetails; + if (serverDetails.ipAddress) { + XhomeInterceptor.#consoleAddrs[serverDetails.ipAddress] = serverDetails.port; + } + if (serverDetails.ipV4Address) { XhomeInterceptor.#consoleAddrs[serverDetails.ipV4Address] = serverDetails.ipV4Port; }