Description
Pairing currently launches HydraExperienceNet --pin pair --headless as a subprocess and relies on QSettings/NSUserDefaults flush before exit. Even with SIGINT fix (v2.0.70) and cert-reuse detection (v2.0.71), we depend on Qt signal handler → QCoreApplication::quit() → QSettings::sync() → CFPreferencesAppSynchronize() completing. hydraheadipad solved this cleanly via HydraPairSession.m: calls the GameStream protocol directly in-process, server cert returned as bytes, no subprocess, no QSettings race. Port the 5-phase GET /pair?phase=... + POST /api/pin protocol to Go. Write server cert directly to NSUserDefaults (macOS) / registry (Windows). Remove subprocess machinery from pairing.go. HydraExperienceNet stream reads from NSUserDefaults as before — no HydraExperienceNet changes needed. v2.0.70 and v2.0.71 are correct stopgaps; this replaces the mechanism entirely. Reference implementation: hydraheadipad/Vendors/hydra-moonlight-ios/Limelight/HydraPairSession.m