Skip to content

IPC Channel Reference ​

ProtocolAccessTypes

All communication between the Renderer Process (DOM) and the Main Process (Node.js) is gated behind a static whitelist enforced in preload.js and strictly typed in src/types/ipc.ts (verified by tests/ipc-channels.test.js). Invocations targeting unlisted channels are rejected immediately.


1. Authentication & Mojang Profile Channels (src/main/ipc-auth.js) ​

IPC ChannelDirectionArgumentsDescription
login-microsoftinvokeNoneStarts the OAuth2 Device Code flow, emits microsoft-device-code, and returns the encrypted token & profile.
refresh-microsoftinvokerefreshTokenDecrypts and refreshes a saved Microsoft session token.
cancel-login-microsoftsendNoneAborts an active Device Code polling session.
microsoft-device-codereceiveDeviceCodeInfoDelivers the user_code and verification_uri to the UI modal.
delete-msa-cacheinvokeNonePurges local Microsoft authentication cache files.
fetch-mojang-profileinvokeuuidQueries Mojang session servers via HTTPS proxy without CORS restrictions.
fetch-mojang-raw-skininvokeurlDownloads a skin texture and returns a data:image/png;base64 URI.
upload-mojang-skininvoke{ token, variant, filePath }Uploads a new skin texture or variant (classic / slim) to Minecraft Services.

2. Launch, Java Runtime & Server Ping Channels (src/main/ipc-game.js) ​

IPC ChannelDirectionArgumentsDescription
launch-gamesendLaunchGamePayloadVerifies game libraries, builds JVM arguments, and spawns the Minecraft Java process.
force-stop-gameinvokeinstanceIdTerminates a running Minecraft instance process.
get-still-runninginvokeNoneReturns the list of currently active Minecraft instance IDs.
check-javainvokejavaPathRuns java -version and returns { valid, majorVersion, versionString }.
scan-java-versionsinvokeNoneScans system directories and managed runtimes for installed JRE/JDKs.
run-forge-installerinvoke{ installerPath, javaExec, mcRoot }Runs a headless Forge or NeoForge installer JAR inside the sandbox.
ping-serverinvokeaddressPings a Minecraft server via TCP Server List Ping (SLP) and SRV DNS resolution.
mc-progress / mc-data / mc-started / mc-closereceiveEvent payloadStreams download progress, game logs (stdout/stderr), start, and exit codes to the UI.

3. Sandboxed Filesystem & System Operations (src/main/ipc-fs.js & src/main/ipc-system.js) ​

IPC ChannelDirectionArgumentsDescription
fs:readFile / fs:writeFile / fs:readdir / fs:stat / fs:mkdir / fs:rm / fs:unlink / fs:rename / fs:cp / fs:copyFile / fs:existsinvokePath & optionsConfined filesystem operations verified by assertPathUnderSandbox.
copy-image-to-sandboxinvoke{ srcPath, destName, subDir }Validates extension and binary Magic Bytes before copying an image into the sandbox.
copy-file-to-sandboxinvoke{ srcPath, destName }Validates allowed import extensions and copies an archive/mod into the sandbox.
extract-zip / compress-folder / read-zip-text / extract-tarinvokeArchive pathsExtracts or compresses archives in background worker threads with anti-Zip-Slip checks.
nbt:parse / nbt:writeinvokeBuffer / NBT rootParses or serializes binary NBT files (servers.dat, level.dat).
system:open-external / system:open-path / system:show-item-in-folderinvokeURL or pathOpens an HTTPS link in browser or reveals a sandboxed file in the OS file manager.
update-discord / reconnect-discordsend / invokePresence payloadUpdates or reconnects Discord Rich Presence over the local IPC pipe.

4. Horizon Cloud Engine Channels (src/main/ipc-horizon.js) ​

IPC ChannelDirectionArgumentsDescription
get-horizon-settingsinvokeNoneReads and decrypts local Horizon cloud configuration.
save-horizon-settingsinvokesettingsEncrypts and saves Horizon cloud configuration on disk.
check-horizon-statusinvokeNoneVerifies whether Horizon is installed and validates its SHA-256 integrity.
install-horizoninvokeNoneDownloads and verifies the official Horizon binary from GitHub Releases.
call-horizoninvokestring[]Invokes Horizon with whitelisted flags (--check, --sync, --upload, --rollback, --quota, --unlock) and streams JSON events via horizon-status.
horizon-status / horizon-install-progressreceiveHorizonEventDelivers real-time JSON protocol events and binary download progress to the UI.

5. Auto-Updater Channels (src/main/updater.js) ​

IPC ChannelDirectionArgumentsDescription
check-for-updatesinvokeNoneQueries GitHub Releases to check if a new launcher version is available.
download-update / confirm-updatesendNoneStarts downloading the update in background.
do-deb-updateinvokeNoneTriggers an update for Debian/Ubuntu .deb installations.
restart_appsendNoneQuits the launcher and installs the downloaded update.
update-available-prompt / update-progress / update-downloadedreceiveEvent payloadNotifies the UI of available updates, download progress, and readiness to install.

Released under the MIT License. Developed for the Gens Ecosystem.