Git Product home page Git Product logo

xbox-cloud-server-selector's Introduction

xbox-cloud-server-selector

A browser extension to select the server region and IP version for Xbox Cloud Gaming

Users on Edge Users on Chrome

Demo of xbox-cloud-server-selector

Installation

Installing from store

The easiest way to install is downloading it from either Microsoft Edge-Add-Ons or the Chrome Web Store.

Installing via Developer mode

  1. Download / clone this repository
  2. Run npm install and npm run build
  3. Open your browsers extensions (edge://extensions/ / chrome://extensions/)
  4. Enable Developer mode (in the left sidebar in Edge, at the top right in Chrome)
  5. Click Load Unpacked and select the dist directory of this repository

Note that Edge / Chrome version 111 or higher is required due to this feature being used.

Usage

Select the region and IP version as desired, then quit any active Xbox Cloud Gaming session and reload Xbox Cloud Gaming to apply the changes.

Confirming functionality

Install this extension, select e.g. IPv6 as IP version. Then start a capture in Wireshark and a game on xbox.com/play. You'll see lots of UDP packets via IPv6 instead of IPv4. You can also select a different region - preferably far away from your actual location for testing - and start a Traceroute to the IP you see in the Wireshark capture. You'll see the packets being routed towards the selected region.

How it works

This extension overwrites the fetch method to intercept requests to the Xbox servers. When loading xbox.com/play, a POST request is made to https://xgpuweb.gssv-play-prod.xboxlive.com/v2/login/user for Game Pass Ultimate users or https://xgpuwebf2p.gssv... for Free to Play users. The response contains a list of all regions with one of them marked as the default region (shortened):

{
  "offeringSettings": {
    "regions": [
      {
        "name": "WestEurope",
        "baseUri": "https://weu.core.gssv-play-prod.xboxlive.com",
        "networkTestHostname": "weu.gssv-fastlane-prod.xboxlive.com",
        "isDefault": true,
        "systemUpdateGroups": null,
        "fallbackPriority": -1
      }
    ]
  }
}

It can be manipulated to force only a specific region to be available to the client.

After starting starting a game, a session will be created. Right after the Xbox logo and sound appear, the ICE candidates are requested from https://[region].core.gssv-play-prod.xboxlive.com/v5/sessions/cloud/[session UUID]/ice. The response contains two candidates, one for IPv4 (with a higher priority of 100) and one for IPv6 (with a lower priority of 1).

{
  "exchangeResponse": "[{\"candidate\":\"a=candidate:1 1 UDP 100 13.104.106.140 1071 typ host \",\"messageType\":\"iceCandidate\",\"sdpMLineIndex\":\"0\",\"sdpMid\":\"0\"},{\"candidate\":\"a=candidate:2 1 UDP 1 2603:1020:703:66::ADB:1931 9002 typ host \",\"messageType\":\"iceCandidate\",\"sdpMLineIndex\":\"0\",\"sdpMid\":\"0\"},{\"candidate\":\"a=end-of-candidates\",\"messageType\":\"iceCandidate\",\"sdpMLineIndex\":\"0\",\"sdpMid\":\"0\"}]",
  "errorDetails": null
}

It can be manipulated so that e.g. the IPv4 candidate is dropped and the session can only be established via the remaining IPv6 candidate.

xbox-cloud-server-selector's People

Contributors

aheartforspinach avatar n-thumann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xbox-cloud-server-selector's Issues

Feature request

Hey man, love your work.
I've came with the idea of building a website that shows queue times, but researching I discovered you already built it. Loved it, very good work.
Now I use your server selector extension. And I came here to make a feature request: Can you add a feture where we queue the servers and receive the latency for each one, so we could know which are a viable choice and which is not?
And a second request: since you already have the backend for queue times, it would be very cool to be able to choose a game in the extension and get the current queue time for each server.
I believe if you implemented those two features it would be killer (more than it already is).
Thanks in advance.

Not Working

just writes error after xbox logo loading.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.