Files
TeslaSuite/Launcher/README.md
T
CydandClaude Opus 4.8 d5c4be26ce Docs: bring READMEs in line with current state (net48, JSON wire)
- Root README: launcher is .NET Framework 4.8 (was .NET 6/x86); RPC is framed
  JSON (was BinaryFormatter); added Contract/ + SecureConfig/; dropped the
  now-resolved "known duplication" warning; corrected the lib/*.dll note
  (TeslaConsoleLaunchLib/TeslaSecureConfiguration are source-built, kept only as
  test baselines); added a short history section.
- Console README: Contract is net48-only; Launcher targets net48.
- Launcher README: net48 framework-dependent (was net8/x64 self-contained);
  needs .NET Framework 4.8 (built into Windows), no bundled runtime.
- DiffTests README: original 4.11.3.37076 vs recovered 4.11.4.x (no longer share
  identity); noted version-insensitive comparison + the new protocol/crypto guards.
- Removed Launcher/assets/MEMORY.md (stale leftover dev-notes, superseded by the
  README and now-moot post-BinaryFormatter).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 13:44:06 -05:00

5.0 KiB

TeslaLauncher

.NET Framework 4.8 (framework-dependent) rewrite of the original Elsewhen Studios LLC software (Windows 2000 / .NET Framework 2.0). net48 ships in Windows 10/11, so the pod needs no separate runtime install and the package stays small (~3.7 MB).

Architecture

TeslaLauncher has three components that work together:

TeslaLauncherService (Windows Service, Session 0)

  • Runs at boot before any user logs in
  • Listens on TCP 53290 for OFB-encrypted framed-JSON RPC from TeslaConsole
  • Forwards commands to the Agent via Named Pipe (TeslaLauncherIPC)
  • Handles first-boot network configuration (SecureConfig)
  • Handles game file transfers from the Console (InstallProduct)

TeslaLauncherAgent (WinForms tray app, user session)

  • Runs in the logged-in user's desktop session
  • Executes commands that require desktop access: launching/killing apps, volume control
  • Manages LaunchApps.xml (installed games registry)
  • On first boot, displays SecureConfig Request ID and Passphrase

SecureConfig (first-boot protocol)

  • Assigns a temporary IP and broadcasts a UDP beacon so the Console can discover the pod
  • Operator reads the Passphrase off the pod screen and enters it into the Console
  • Console sends AES-encrypted network configuration (IP, mask, gateway, DNS, hostname)
  • TCP handshake establishes an OFB-encrypted session with RSA key exchange
  • Session key is saved for all subsequent Console connections

Communication Flow

TeslaConsole ──TCP 53290 (OFB + framed JSON)──> TeslaLauncherService
                                                      │
                                                Named Pipe (JSON)
                                                      │
                                                      v
                                                TeslaLauncherAgent

Files

File Description
TeslaLauncherService.cs Windows Service implementation
TeslaLauncherService.csproj Service project (net48, generic host + Windows service)
TeslaLauncherAgent.cs Userspace Agent implementation
TeslaLauncherAgent.csproj Agent project (WinForms, net48)
LaunchModels_Shared.cs Service↔Agent IPC types (Tesla.Launcher.Shared). Wire types (Tesla.Net) now come from ../Contract/Tesla.Contract.csproj
SecureConfig.cs First-boot secure configuration protocol
build.bat Builds both components
install.bat Installs on a cockpit PC (run as Administrator)

Building

Requirements:

  • .NET SDK (6.0+) to drive the build
  • Internet access for NuGet restore (first build only)
build.bat              :: build both components + assemble the package
build.bat /service     :: build Service only
build.bat /agent       :: build Agent only

Output goes to TeslaLauncher\ with Service\ and Agent\ subdirectories plus install.bat. The projects are published in place (framework-dependent net48) — they reference ../Contract, so they cannot be staged into a temp folder. Each folder holds the exe plus its dependency DLLs; the target pod needs only .NET Framework 4.8 (built into Windows 10/11), no bundled runtime.

Installation

  1. Copy the TeslaLauncher\ folder to each cockpit PC
  2. Run TeslaLauncher\install.bat as Administrator

The installer:

  • Registers the Service (delayed auto-start)
  • Configures the Agent for auto-login startup
  • Installs OpenAL and DirectX runtimes
  • Enables SMB1 file sharing
  • Creates C:\Games with appropriate permissions
  • Resets network adapters to DHCP for SecureConfig

First Boot

  1. Cockpit boots with DHCP (unconfigured state)
  2. Service runs SecureConfig: broadcasts beacon, displays codes on screen
  3. Console operator sees the pod's Request ID and enters the Passphrase
  4. Console sends encrypted network configuration
  5. Pod applies the configuration and is ready for normal operation

Normal Operation

The Console connects to each configured pod on TCP 53290 and can:

  • Install/uninstall simulation games
  • Launch/kill applications
  • Get/set volume level
  • Query pod status (FullUpdate)
  • Shutdown or reboot the pod

Key Paths

Path Purpose
C:\ProgramData\TeslaLauncher\TeslaKeyStore.key Session key (32 bytes)
C:\ProgramData\TeslaLauncher\LaunchApps.xml Installed games registry
C:\ProgramData\TeslaLauncher\configuring.json Transient: SecureConfig codes for Agent display
C:\Games\ Game installation directory

Wire Protocol

The Console talks to the Service with length-prefixed System.Text.Json frames over the OFB-encrypted TCP stream (dispatch by method name) — see ../Contract/PodRpcProtocol.cs, shared by both ends. This replaced the original BinaryFormatter + serialized-MethodBase scheme. The Tesla.Net wire types now live in ../Contract/Tesla.Contract.csproj, the single source of truth shared with the Console.

The Service-to-Agent IPC uses length-prefixed JSON over a Named Pipe, with flat types that avoid the nested struct layout of the wire format.