Skip to content

v3.0.0 — Rust rewrite

Choose a tag to compare

@rokogan rokogan released this 26 Nov 01:16
· 24 commits to master since this release

The PC service, rebuilt in Rust

The Windows side is now a single 1.4 MB MagicRemoteService.exe with the web UI, TV app, cursor and icon built in. It speaks the same protocol to the same TV app and reads your existing bindings.json, tv-config.json and registry settings, so it replaces 2.x in place.

Install or upgrade

  1. Download MagicRemoteService.exe below.
  2. In an administrator PowerShell, in the download folder, run:
    .\MagicRemoteService.exe install | Out-Host
    
    It copies itself to C:\Program Files\MagicRemoteService, brings bindings.json and tv-config.json over from where the old service ran, registers the service (restarted automatically if it fails), adds the firewall rules and starts it. Registry settings carry over as they are.
  3. Open http://localhost:41231 and click Reinstall TV App to put this release's TV fixes on your TV. This needs Node.js, @webos-tools/cli and your TV set up with ares-setup-device, as before.

Windows may warn that the exe is from an unknown publisher: it is not code-signed.

What's new

  • One file, no build chain: no .NET Framework, MSBuild, Visual Studio Build Tools or NuGet.
  • Lighter: about 2 MB of private memory for the idle worker, against about 50 MB for the two 2.x processes.
  • Self-healing: the service keeps one worker in the signed-in session and restarts it after a crash or when the console moves to another session.
  • Settings apply live: bindings, scroll exclusions, the device token and the shutdown timeouts take effect without a restart, including for TVs already connected.
  • Web UI:
    • PC settings: port, shutdown timeouts, start with Windows
    • which display each TV's pointer maps to
    • every connected TV
    • a Recent Events log
      The WinForms settings window is gone.
  • Safer:
    • The service runs only from Program Files, where only administrators can change it.
    • Command bindings, ares-cli and the browser run as the signed-in user, not as SYSTEM.
    • The web UI listens on loopback only and refuses foreign Host names and origins.
    • The device token is compared in constant time.
    • A connection must finish its WebSocket handshake within 10 seconds.
  • Exact pointing: per-monitor DPI awareness, so the TV's pointer lands on exact pixels on high-DPI and multi-monitor PCs.

Fixes

PC:

  • Your mouse speed is restored when the remote's pointer hides; 2.x never restored it.
  • One TV hiding its pointer no longer resets the cursor for another.
  • /api/pcinfo lists the network with a gateway first, so the auto-detected PC IP is no longer a VPN or virtual adapter.
  • Two ares-cli runs at once (a reinstall while the web UI lists TVs) no longer break each other.

TV app:

  • Wake-on-LAN no longer wakes the PC right after it shuts down or sleeps. It wakes the PC when you open the app, or come back to its input, while the PC is off, and gives up after 15 seconds.
  • Reconnect timers no longer stack up and keep replacing a working connection.
  • Holding Back to exit no longer sends Escape to the PC; a short press is sent on release.
  • The TV service retries when the TV refuses its SSAP connection, instead of crashing.

Web UI:

  • Saves report server errors.
  • Reset no longer restarts the service.
  • "Start with Windows" is not sent while its box is disabled.

Commands

Command What it does
MagicRemoteService.exe install Install or upgrade (administrator)
MagicRemoteService.exe uninstall Stop and remove the service (administrator)
MagicRemoteService.exe status Service state, port and connected TVs
MagicRemoteService.exe --port 41330 --no-ssdp Run a second copy on its own, beside the service, to try a build

Known limitations

  • install.bat and build.bat in the source still build the C# 2.x service; use the exe above instead.
  • Deploying the TV app still needs Node.js and @webos-tools/cli.
  • The exe is not code-signed.

Tested on Windows 10 with an LG C2 (webOS 25).

SHA-256 of MagicRemoteService.exe: 22826960e3a821355c4c4e53fef6f6d0ea6f8d88064f8cf46d2268b46a687d90 (built from 5a091d3; the tagged commit only adds a README change).