Skip to content
 
 

Repository files navigation

Wolf (Custom Fork)

C++ Docker Upstream License

This is a personal fork of the Games on Whales: Wolf streaming server. All core streaming architecture and code credit belong to the upstream Games on Whales team.

I created this fork to address two specific issues encountered while running Wolf in my multi-node homelab setup (Twierdza):

  1. Premature release of keyboard modifier keys (Shift, Ctrl, Alt, Meta) in the virtual input handler.
  2. PulseAudio auto-router conflicts with out-of-band VBAN microphone streams.

Patches Applied in this Fork

1. Keyboard Modifier State Fix

  • File: src/moonlight-server/control/input_handler.cpp
  • Problem: In upstream Wolf, pressing any regular key while holding a modifier (like Shift + W to sprint or Ctrl + C) immediately called keyboard.release() for the modifier key right after emitting the primary key packet. This caused modifier keys to drop unexpectedly during gameplay and typing.
  • Fix: Removed the synthetic release calls so modifier keys stay held down until the client sends an explicit keyup packet.

2. VBAN Audio Isolation and Virtual Sink

  • Files: src/moonlight-server/audio/pulse_router.cpp, src/moonlight-server/sessions/moonlight.cpp, src/moonlight-server/sessions/common.cpp
  • Problem: Wolf's automatic PulseAudio router re-routes all application audio into the default streaming sink. When running VBAN (Voice Band Audio Network) inside the guest container for player microphone talkback, Wolf intercepted the voice stream and mixed it back into the outgoing stream. Additionally, hardcoding PULSE_SINK prevented manual audio sink management.
  • Fix:
    • Excluded processes with "vban" in their name or binary path from the automatic sink router (pulse_router.cpp).
    • Added automated creation of a dedicated vban_mic_sink virtual sink on session startup (moonlight.cpp).
    • Removed forced PULSE_SINK environment export in common.cpp to allow applications to bind to custom sinks.

How to Build

git clone https://github.com/Mateosek/wolf.git
cd wolf
docker build -t gow/wolf:custom -f docker/wolf.Dockerfile .

Architecture & Integration

In my homelab setup (Twierdza), this custom Wolf image runs alongside a tailored guest container (gow/xfce-steam:edge) and a FastAPI management agent: See Mateosek/twierdza-cloud-gaming.

flowchart TD
    Client["Moonlight Client + VBAN Talkie"] <-->|"Encrypted Mesh (NetBird / WireGuard)"| Host["Host (Wolf Custom Image)"]
    Host -->|"C++ Core + GStreamer NVENC/VAAPI"| VideoStream["Video & Audio Stream (Moonlight)"]
    Host -->|"PulseAudio vban_mic_sink"| AudioMic["Isolated Microphone Channel"]
    Host -->|"Linux /dev/uinput"| InputSubsys["Virtual Keyboard & Gamepads"]
    AudioMic --> Container["Guest Gaming Container (XFCE / Proton / Steam)"]
    InputSubsys --> Container
Loading

Upstream Project & Credits

About

Custom Wolf fork featuring low-level C++ input state machine fixes, dedicated PulseAudio virtual sink isolation for VBAN microphones, and distributed container orchestration.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages