Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/n-thumann/xbox-cloud-server-selector
A browser extension to select the server region and IP version for Xbox Cloud Gaming
https://github.com/n-thumann/xbox-cloud-server-selector
chrome chrome-extension edge ipv6 xbox-cloud xcloud
Last synced: about 2 months ago
JSON representation
A browser extension to select the server region and IP version for Xbox Cloud Gaming
- Host: GitHub
- URL: https://github.com/n-thumann/xbox-cloud-server-selector
- Owner: n-thumann
- License: mit
- Created: 2023-02-25T23:06:17.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-22T21:10:17.000Z (7 months ago)
- Last Synced: 2024-05-22T21:57:39.418Z (7 months ago)
- Topics: chrome, chrome-extension, edge, ipv6, xbox-cloud, xcloud
- Language: TypeScript
- Homepage:
- Size: 115 KB
- Stars: 21
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xbox-cloud-server-selector
## Installation
### Installing from store
The easiest way to install is downloading it from either [Microsoft Edge-Add-Ons](https://microsoftedge.microsoft.com/addons/detail/xbox-cloud-server-selector/looadgdipbgeafcccmoagnbbgnjgeefp) or the [Chrome Web Store](https://chrome.google.com/webstore/detail/xbox-cloud-server-selector/lanknfgmjkocejapddeibabjpdenkpnn).
### 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 repositoryNote that Edge / Chrome version 111 or higher is required due to [this feature](https://chromium-review.googlesource.com/c/chromium/src/+/4119014) 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](https://www.wireshark.org/) and a game on [xbox.com/play](https://www.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`](https://developer.mozilla.org/en-US/docs/Web/API/fetch) method to intercept requests to the Xbox servers.
When loading [xbox.com/play](https://www.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):```json
{
"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).```json
{
"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.