[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-111796":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":9,"pushedAt":33,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":14,"starSnapshotCount":14,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},111796,"stadiacast","jkfran\u002Fstadiacast","jkfran","A local server for the Stadia Controller's Wi-Fi mode: keeps the controller working with your own PC after the Stadia shutdown",null,"Python",146,16,4,0,3,20,84,18,68.09,"MIT License",false,"main",[24,25,26,27,28,29,30,31,32],"dtls","gamepad","interoperability","protobuf","python","reverse-engineering","stadia","stadia-controller","webrtc","2026-11-18 21:05:58","2026-11-23 19:00:55","\u003Cp align=\"center\">\n  \u003Cimg alt=\"Stadiacast: a local server for the Stadia Controller's Wi-Fi mode\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fjkfran\u002Fstadiacast\u002Fmain\u002Fdocs\u002Fimages\u002Flogo.svg\" width=\"560\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fjkfran\u002Fstadiacast\u002Factions\u002Fworkflows\u002Fci.yml\">\u003Cimg alt=\"CI\" src=\"https:\u002F\u002Fgithub.com\u002Fjkfran\u002Fstadiacast\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg\">\u003C\u002Fa>\n  \u003Cimg alt=\"Python 3.11+\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.11%2B-3776AB?logo=python&amp;logoColor=white\">\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fstadiacast\u002F\">\u003Cimg alt=\"PyPI\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fstadiacast\">\u003C\u002Fa>\n  \u003Cimg alt=\"Status: works end to end\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fstatus-works%20end%20to%20end-brightgreen\">\n  \u003Ca href=\"LICENSE\">\u003Cimg alt=\"License: MIT\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue\">\u003C\u002Fa>\n\u003C\u002Fp>\n\nGoogle shut Stadia down in January 2023 and, with it, the cloud endpoints the Stadia\nController's **Wi-Fi mode** depends on. Stadiacast is a small server you run on your own\nnetwork that stands in for those endpoints, so the controller you own keeps working with your\nown PC: it joins your Wi-Fi, connects, stays on, reports every button, stick and trigger,\nvibrates on request and plays sound on its headset jack.\n\n> **Status:** works end to end with controllers running their Wi-Fi firmware (tested with\n> `ota.282115`), several at once. Expect rough edges. Questions go to\n> [Discussions](https:\u002F\u002Fgithub.com\u002Fjkfran\u002Fstadiacast\u002Fdiscussions), bugs to the\n> [issues](https:\u002F\u002Fgithub.com\u002Fjkfran\u002Fstadiacast\u002Fissues); pull requests are very welcome.\n> Switched your controller to Bluetooth mode? It comes back, see [Requirements](#requirements).\n\n## Key features\n\n- 🛠️ **No firmware modification.** The receiver speaks the controller's stock protocol as is,\n  and never flashes anything.\n- 🔒 **No account, no cloud service.** Input, rumble and headset audio stay between the\n  controller and your PC.\n- 📜 **Nothing to obtain.** The receiver ships a certificate the controller accepts: unpack,\n  run, wake the controller.\n- 🎮 **A PC gamepad on Windows.** Every controller becomes an Xbox 360 controller for your\n  games, and the game's rumble reaches the controller.\n- 🍎 **A gamepad on macOS.** Through the OpenJoystickDriver app every controller becomes an Xbox\n  controller for Mac games, rumble included.\n- 🎧 **Headset audio.** What the PC plays, or any file, streams to a headset plugged into the\n  controller.\n- 👥 **Several controllers at once**, each one its own player.\n\n\u003Cp align=\"center\">\n  \u003Cimg alt=\"The controller talks to Stadiacast over Wi-Fi, and Stadiacast feeds your games as an Xbox 360 pad\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fjkfran\u002Fstadiacast\u002Fmain\u002Fdocs\u002Fimages\u002Fflow.svg\" width=\"680\">\n\u003C\u002Fp>\n\n## Quick start\n\n```sh\npip install 'stadiacast[ble,audio,gamepad]'           # or unpack an executable from the releases page\nstadiacast --preset live --dns-upstream 192.168.1.1   # your router: the DNS sink forwards the rest there\n```\n\n1. **Network.** Put the controller and the receiver on one network where the receiver's\n   machine is the controller's DNS server; a hotspot hosted by that machine is the simplest\n   ([docs\u002Fsetup.md](docs\u002Fsetup.md#network)).\n2. **First boot only.** A controller fresh out of the box, or one that was reset, waits in\n   Bluetooth setup mode for its Wi-Fi credentials:\n\n   ```sh\n   stadiacast-provision scan\n   stadiacast-provision provision --address \u003CADDR> --ssid \u003Cyour SSID>\n   ```\n\n3. **Start the receiver** with the command above; for a virtual gamepad add `--gamepad vigem`\n   on [Windows](#virtual-gamepad-windows) or `--gamepad ojd` on\n   [macOS](#virtual-gamepad-macos). From a source checkout,\n   `tools\u002Fstart_receiver.sh` does the same in the background, with the settings of a `.env`\n   file (see `.env.example`).\n4. **Wake the controller** with a ~1 s press of the Stadia button, released at the first\n   vibration. Two short rumbles and a steady light mean it found the receiver; a blinking\n   light with no rumble is a short \"report wake\", so press again.\n5. **Watch the input.** The console shows one line per report,\n   `GET http:\u002F\u002F\u003Creceiver>\u002F_status` shows the session state, the battery level and whether a\n   headset is plugged in, and with an install from PyPI or from source\n   `stadiacast-show-input captures\u002F\u003Cstamp>` summarizes a run.\n6. **Rumble.** Start with `--start-game`, since the game session is the only path to the\n   motors, then post levels from 0 to 65535:\n\n   ```sh\n   curl -d '{\"left\":40000,\"right\":40000,\"ms\":1500}' http:\u002F\u002F\u003Creceiver>\u002F_rumble   # pulse\n   curl -d '{\"left\":65535,\"right\":20000}' http:\u002F\u002F\u003Creceiver>\u002F_rumble              # hold\n   curl -d '{\"left\":0,\"right\":0}' http:\u002F\u002F\u003Creceiver>\u002F_rumble                     # stop\n   ```\n\n7. **More controllers** each get their own session, `c0`, `c1`, ... in the log and in\n   `\u002F_status`; name the target of a control request with `?controller=c1` or a `\"controller\"`\n   field in the JSON body.\n8. **Stop** with Ctrl-C, or `tools\u002Fstop_receiver.sh` for a receiver the start script launched.\n\n`--preset live` is the flag set proven end to end; explicit flags override it, and\n`stadiacast --help` lists every knob.\n\n## How it works\n\n1. **DNS.** The controller must use the receiver's machine as its DNS server. The receiver\n   spawns a small DNS server that points the Google names it needs at itself and forwards\n   everything else upstream.\n2. **HTTPS.** The firmware validates the server certificate against its built-in Google Trust\n   Services roots and checks neither the hostname, nor the dates, nor revocation, so one GTS\n   chain, the one the receiver ships, lets it answer every Google name.\n3. **WebRTC.** The controller offers a WebRTC session in its `DiscoverDisplay` request; the\n   receiver answers over the GMsg push channel, terminates STUN and DTLS, and plays the\n   display side of the post-DTLS RPC handshake until the controller reaches READY and starts\n   reporting input.\n4. **Game session.** On `StartGame` the controller opens a second session for game streaming.\n   That session carries input too, and it is the only path to the controller's rumble motors.\n\n[docs\u002Fprotocol.md](docs\u002Fprotocol.md) describes the protocol in detail and\n[docs\u002Farchitecture.md](docs\u002Farchitecture.md) how the code is put together.\n\n## Requirements\n\n- A Stadia Controller running its Wi-Fi firmware (tested with `ota.282115`). A controller\n  switched to Bluetooth mode can be flashed back with community tools; Stadiacast itself never\n  flashes anything.\n- A Windows, macOS or Linux computer on the controller's network, acting as its DNS server.\n  The reference rig is a macOS Internet Sharing hotspot. On Linux, binding ports 53, 80, 123\n  and 443 needs root or `CAP_NET_BIND_SERVICE`; on Windows the firewall may have to let the\n  controller in ([docs\u002Fsetup.md](docs\u002Fsetup.md#network)).\n- Nothing else for the basics: the receiver ships a certificate the controller accepts\n  ([serving your own](docs\u002Fsetup.md#certificate) is optional), and the executables include\n  Python. An install from PyPI or from source needs Python 3.11 or newer.\n- Optional: ffmpeg for [headset audio](#headset-audio), a driver for the virtual gamepad on\n  [Windows](#virtual-gamepad-windows) and on [macOS](#virtual-gamepad-macos) (the one on\n  [Linux](#virtual-gamepad-linux) needs none), `tcpdump` for packet captures.\n\n## Install\n\n**Executables.** Every [release](https:\u002F\u002Fgithub.com\u002Fjkfran\u002Fstadiacast\u002Freleases) carries an\narchive for Windows x86_64, macOS (Apple silicon) and Linux x86_64 with two programs,\n`stadiacast` and `stadiacast-provision`, as single files, Python included. Unpack it and run\n`stadiacast` from a terminal. The builds are not signed: macOS blocks each program at its\nfirst start until you allow it in System Settings → Privacy & Security → Open Anyway, or\nclear the quarantine flag of both with\n`xattr -d com.apple.quarantine stadiacast stadiacast-provision`; Windows SmartScreen may warn.\n\n**From PyPI**, with Python 3.11 or newer: `pip install 'stadiacast[ble,audio,gamepad]'` (or\n`uv tool install 'stadiacast[ble,audio,gamepad]'`); the extras are optional, see below.\n\n**From source**, with [uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F):\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fjkfran\u002Fstadiacast.git\ncd stadiacast\nuv sync --all-extras\n```\n\nor with pip, `pip install -e \".[ble,passthrough,audio,gamepad]\"`. An install from PyPI or\nfrom source has a third command, `stadiacast-show-input`. The `ble` extra is the Bluetooth\nprovisioning, `audio` and `gamepad` are the [headset audio](#headset-audio) capture and the\n[virtual gamepad](#virtual-gamepad-windows), and `passthrough` lets the receiver fetch the\ncontroller's configuration (`stadiaconfig`) from Google for it, which only happens when\n`clients3.google.com` is redirected to the receiver (not by default).\n`tools\u002Fstart_receiver.sh` finds the virtualenv on its own.\n\n## Input\n\nIn READY the controller reports every change on the display link. The receiver decodes it\ninto events with named buttons, stick axes (-32768 to 32767, Y up) and triggers (0 to 255),\nwith the button bits in the XInput layout. The full report is in\n[docs\u002Fprotocol.md](docs\u002Fprotocol.md#input-report-controllertodisplay-3).\n\n## Headset audio\n\nThe receiver can play sound on a headset plugged into the controller. ffmpeg with libopus\nencodes every source, so it has to be on `PATH`:\n\n```sh\nstadiacast --audio-source tone          # 440 Hz, proves the path without any audio setup\nstadiacast --audio-source file:x.ogg    # anything ffmpeg can decode\nstadiacast --audio-source system        # what this computer plays\nstadiacast --audio-source device:NAME   # one capture device; --audio-devices lists them\n```\n\nThe stream starts once the display link reaches READY. `--audio-bitrate` sets the Opus bitrate\n(64 kbit\u002Fs by default), `--audio-application` favours delay (`lowdelay`, the default) or\nmusic (`audio`), and `--audio-volume` the gain. `\u002F_status` reports the stream under `playback`\nand `\u002F_audio` starts, stops and adjusts it while the receiver runs\n([docs\u002Fsetup.md](docs\u002Fsetup.md#running)).\n\n`system` and `device:NAME` capture sound. On macOS and Windows that needs the `audio` extra,\nwhich the executables and `uv sync --all-extras` include. On macOS, send the sound to a virtual\noutput such as BlackHole (`brew install blackhole-2ch`), alone or in a Multi-Output Device\nnext to the speakers; the volume keys do not act on it, so set the loudness in the app or with\n`--audio-volume`. On Windows the default output's loopback is captured and the volume slider\nand mute reach the headset (`--audio-follow-volume off` sends the raw mix). On Linux `system`\nrecords the monitor of the default output from PulseAudio or PipeWire, through their `pactl`\nand `parec` (the `pulseaudio-utils` package), also when the receiver runs with `sudo`; set the\nloudness with `--audio-volume`, since the volume keys do not act on the monitor. `device:NAME`\non Linux is a PortAudio input and needs the `audio` extra and the PortAudio library (`apt\ninstall libportaudio2`). How the stream rides the display link is in\n[docs\u002Fprotocol.md](docs\u002Fprotocol.md#audio-to-the-headset-jack).\n\n## Virtual gamepad (Windows)\n\n`--gamepad vigem` turns each controller into an ordinary Xbox 360 controller for the games on\nthe receiver's PC:\n\n```sh\nstadiacast --gamepad vigem              # one virtual pad per controller\n```\n\nOnly a driver can create a device that Windows and its games see as a controller, so this\nneeds one extra install, once and with an admin prompt: the\n[ViGEmBus](https:\u002F\u002Fgithub.com\u002Fnefarius\u002FViGEmBus\u002Freleases) driver, the same one behind\nDS4Windows, Sunshine and the other tools of this kind. Its author archived the project in 2023\nand 1.22.0 is the final version; it still installs and works on current Windows 10 and 11. It\nhas to be desktop Windows, since Windows Server lacks the Xbox 360 controller driver the pad\nbinds to. Without the driver, the receiver stops at start-up with one line that says so;\ninstalling the `gamepad` extra, from PyPI or from source, offers to run the driver's\ninstaller.\n\nEvery report reaches the pad as XInput fields with the standard stick deadzones\n(`--gamepad-deadzone off` for raw sticks); the Stadia button is the guide button, Assistant\nand Capture have no XInput equivalent. The game's rumble comes back to the controller through\nthe game session, which `--gamepad` starts for that reason. Two controllers are players 1 and\n2, and `\u002F_status` lists the pads under `gamepads`.\n\n## Virtual gamepad (macOS)\n\n`--gamepad ojd` turns each controller into an Xbox controller for the games on a Mac, through\n[OpenJoystickDriver](https:\u002F\u002Fgithub.com\u002Fxsyetopz\u002FOpenJoystickDriver), an app that publishes\nvirtual gamepads on macOS 12 and later:\n\n```sh\nstadiacast --preset live --dns-upstream 192.168.1.1 --gamepad ojd\n```\n\nIt needs one extra install, once: put\n[OpenJoystickDriver 0.6.0-alpha.1](https:\u002F\u002Fgithub.com\u002Fxsyetopz\u002FOpenJoystickDriver\u002Freleases\u002Ftag\u002F0.6.0-alpha.1)\ninto Applications, open it, and allow it under System Settings → Privacy & Security →\nAccessibility, and under Input Monitoring when macOS lists it there. That release is the one\nthis output is written for, and the last one under the MIT license; later ones are for\nnoncommercial use only. The driver is alpha software and this output is new, so expect rough\nedges.\n\nThe app has to be running. The receiver finds it in Applications, or its `ojd` command on\n`PATH`, or the executable `--ojd-path` names. A pad that cannot start, or stops, shows the\ndriver's own message under `gamepads` in `\u002F_status` and in a `gamepad_failed` record of the\nlog; the controller's next boot tries again.\n\n`--gamepad-profile` chooses what the pad says it is:\n\n| profile | the pad |\n|---|---|\n| `game-controller-compatible`, the default | an Xbox Wireless Controller. Apple's GameController framework, Chrome and SDL2 take its input, and Chrome and SDL2 send it rumble |\n| `sdl-compatible` | an Xbox Adaptive Controller |\n| `generic` | a plain HID gamepad without rumble, for a program with bindings of its own |\n\nTry the other two when a game does not take the default.\n\nButtons, sticks and triggers map as on Windows, with the same deadzones (`--gamepad-deadzone\noff` for raw sticks). The Stadia button is the guide button, and what macOS does on it is set\nin System Settings → Game Controllers. The game's rumble comes back to the controller through\nthe game session, which `--gamepad` starts for that reason. Every controller is a pad of its\nown, up to the four the driver allows, and `\u002F_status` lists them under `gamepads`.\n\n## Virtual gamepad (Linux)\n\n`--gamepad uinput` turns each controller into a wired Xbox 360 controller for the games on a\nLinux PC, through the kernel's uinput device. There is nothing to install:\n\n```sh\nstadiacast --preset live --dns-upstream 192.168.1.1 --gamepad uinput\n```\n\nThe pad has the buttons, the axes and the name the kernel gives a real one, and SDL, which\nSteam and most Linux games read gamepads through, takes it for an Xbox 360 controller. It\nappears with the controller's first input and is unplugged when the controller is switched\noff, as a wireless pad is.\n\nCreating a pad means opening `\u002Fdev\u002Fuinput`, which on most systems only root may do. A receiver\nthat runs as root can. For one that does not, a udev rule gives the device to whoever sits at\nthe computer, which is what Steam's own rules do where they are installed:\n\n```sh\necho 'KERNEL==\"uinput\", SUBSYSTEM==\"misc\", TAG+=\"uaccess\", OPTIONS+=\"static_node=uinput\"' |\n    sudo tee \u002Fetc\u002Fudev\u002Frules.d\u002F60-stadiacast.rules\nsudo udevadm control --reload-rules && sudo udevadm trigger --name-match=uinput\n```\n\nOn a computer nobody is logged in at, a server for instance, put `MODE=\"0660\", GROUP=\"input\"`\nin place of the `TAG` and run the receiver as a member of that group. Without the right to open\nthe device, the receiver stops at start-up with one line that says so.\n\nButtons, sticks and triggers map as on Windows, with the same deadzones (`--gamepad-deadzone\noff` for raw sticks); the Stadia button is the guide button. A game's rumble, which reaches\nthe pad as force feedback, comes back to the controller through the game session, which\n`--gamepad` starts for that reason. Every controller is a pad of its own, and `\u002F_status` lists\nthem under `gamepads` with their event device.\n\n## Development\n\n```sh\nuv sync --all-extras      # the receiver, its extras and the dev tools\nmake check                # ruff, shellcheck, mypy, the schema check and the tests\n```\n\nThe tests need no hardware: `tests\u002Ffake_controller.py` reproduces the firmware's network\nbehaviour. [CONTRIBUTING.md](CONTRIBUTING.md) has the workflow, how to run the fake by hand\nagainst a receiver in lab mode, and how to test against a real controller safely.\n\n## Roadmap\n\n1. **First-boot autoconnect:** detect a controller in BLE setup mode and provision it onto the\n   network automatically (today `stadiacast-provision` is the manual version).\n\n## Security and privacy\n\nThe receiver listens on your LAN with no authentication and is meant for a trusted network\nsuch as a hotspot you host. It never contacts Google itself, except for the `stadiaconfig`\npassthrough above. The controller still makes two requests to Google at boot, its\nconnectivity check and its configuration, which the DNS sink forwards\n([docs\u002Fsetup.md](docs\u002Fsetup.md#network)). See [SECURITY.md](SECURITY.md).\n\n## Legal\n\nThis is an independent interoperability project for owners of the Stadia Controller. It is\nnot affiliated with, endorsed by or supported by Google. Stadia is a trademark of Google LLC.\n\nStadiacast contains no Google source code and neither includes nor distributes the\ncontroller's firmware: the firmware stays on your controller and the receiver speaks its\nstock network protocol as-is. The protocol was recovered by observing the controller and by\nanalysing the firmware it runs, for the sole purpose of interoperability. Three protobuf\nschemas are reproduced from descriptors embedded in that firmware; they are Google's, and\n[NOTICE](NOTICE) lists them. Please do not post firmware images, decompiled code or whole\npacket captures in issues or pull requests.\n\nStadiacast is released under the [MIT License](LICENSE), with the exception stated in\n[NOTICE](NOTICE).\n","Stadiacast 是一个本地运行的轻量级服务器，用于替代已关停的 Google Stadia 云服务，使 Stadia 控制器在 Wi-Fi 模式下继续与个人电脑协同工作。它通过复现原生协议（基于 DTLS、WebRTC 和 Protocol Buffers），实现按键、摇杆、扳机、震动反馈及耳机音频流的端到端本地处理，无需刷写固件或依赖云端账户。支持 Windows（模拟 Xbox 360 手柄）和 macOS（配合 OpenJoystickDriver），允许多台控制器同时连接。适用于希望延续使用 Stadia 控制器进行本地游戏、测试或跨平台输入适配的用户。",2,"2026-11-24 04:41:47","CREATED_QUERY"]