$ show games-on-whales/wolf
Wolf is a production-grade game streaming server that implements the Moonlight (NVIDIA GameStream) protocol. It allows multiple remote clients to play games or run applications on a single Linux host, sharing a GPU and input devices. The system runs games in isolated Docker containers, captures their output via a custom headless Wayland compositor, encodes video/audio using hardware-accelerated GStreamer pipelines (NVIDIA NVENC, Intel QSV, AMD VA-API), and streams the result over RTP with forward error correction (Reed-Solomon) and AES encryption. Input from Moonlight clients is injected into containers via virtual uinput devices, and audio is routed through PulseAudio virtual sinks. The server provides a REST API for Moonlight client pairing/control, a Unix socket management API for a companion web UI, and supports multi-session lobbies. The architecture is monolithic but modular, using an event bus for decoupling, immutable state with `immer`, and a plugin system for GStreamer video/audio payloaders. The codebase demonstrates strong C++20 practices, portability across Linux distributions, and deep integration with kernel and GPU subsystems. It is not a data research project; it is a low-latency streaming application.
The LLM identified 5 files worth highlighting for reuse:
A self-contained C wrapper around the nanors Reed-Solomon library, providing forward error correction for streaming video/audio. It includes runtime CPU-dispatch for SSSE3, AVX2, and AVX512 optimizations. Completely standalone, can be extracted for any project requiring FEC with erasure coding.
A portable cryptographic library implementing AES (ECB, CBC, GCM), RSA signing/verification, and x509 certificate generation and parsing. Designed for Moonlight protocol compatibility, but the abstractions are fully generic and could be reused in any C++ project needing low-level crypto with minimal dependencies.
A Docker API client that communicates over the local Unix socket using libcurl and nlohmann/json. Supports creating, starting, stopping, and inspecting containers, as well as pulling images with progress reporting. Well-encapsulated and reusable for any application that needs to manage Docker containers programmatically.
A collection of classes for creating virtual input devices (keyboard, mouse, gamepad, touchscreen, pen tablet) using Linux uinput and libevdev. Each device type is isolated and follows a consistent pattern. Could be extracted as a standalone library for automated testing, remote desktop, or input simulation tools.
A standalone CLI tool for injecting fake udev events into running Docker containers to simulate hotplug of virtual input devices. Uses libudev to send uevents. Demonstrates a reusable pattern for container-to-host device integration that could be adapted for other hotplug scenarios.