Update ICE candidates

This commit is contained in:
redphx 2024-07-06 11:08:41 +07:00
parent e75fa397ee
commit c93db035f3

View File

@ -10,6 +10,7 @@ import { getPreferredServerRegion } from "@utils/region";
import { GamePassCloudGallery } from "../enums/game-pass-gallery"; import { GamePassCloudGallery } from "../enums/game-pass-gallery";
import { InputType } from "./bx-exposed"; import { InputType } from "./bx-exposed";
import { FeatureGates } from "./feature-gates"; import { FeatureGates } from "./feature-gates";
import { BxLogger } from "./bx-logger";
enum RequestType { enum RequestType {
XCLOUD = 'xcloud', XCLOUD = 'xcloud',
@ -95,7 +96,7 @@ function updateIceCandidates(candidates: any, options: any) {
newCandidates.push(newCandidate('a=end-of-candidates')); newCandidates.push(newCandidate('a=end-of-candidates'));
console.log(newCandidates); BxLogger.info('ICE Candidates', newCandidates);
return newCandidates; return newCandidates;
} }
@ -157,6 +158,10 @@ class XhomeInterceptor {
console.log(obj); console.log(obj);
const serverDetails = obj.serverDetails; const serverDetails = obj.serverDetails;
if (serverDetails.ipAddress) {
XhomeInterceptor.#consoleAddrs[serverDetails.ipAddress] = serverDetails.port;
}
if (serverDetails.ipV4Address) { if (serverDetails.ipV4Address) {
XhomeInterceptor.#consoleAddrs[serverDetails.ipV4Address] = serverDetails.ipV4Port; XhomeInterceptor.#consoleAddrs[serverDetails.ipV4Address] = serverDetails.ipV4Port;
} }