Skip to content

fix(desktop): allow private self-hosted origins - #9765

Open
cburyta wants to merge 2 commits into
simstudioai:mainfrom
cburyta:fix/desktop-private-self-host
Open

cburyta wants to merge 2 commits into
simstudioai:mainfrom
cburyta:fix/desktop-private-self-host

Conversation

@cburyta

@cburyta cburyta commented Nov 7, 2026

Copy link
Copy Markdown

Summary

Allow Sim Desktop to load a configured self-hosted origin when its hostname resolves to private address space.

Chromium's Local Network Access checks can reject the main-frame navigation with ERR_ADDRESS_UNREACHABLE (-109) before Electron reaches the deployment or can present a permission prompt. The configured Sim origin is already an explicit trust decision and owns the shell preload bridge.

This change adds an ip-address-space-overrides entry for only the configured self-hosted hostname. It does not disable Local Network Access checks process-wide, so arbitrary built-in browser destinations retain the protection. Sim-operated and loopback origins are unchanged. Server changes already relaunch the app, so the override follows the newly configured origin on restart.

Reproduction

Tested with Sim Desktop 0.9.46 / Electron 43.8.1 and a self-hosted HTTPS origin resolving to 192.168.50.153:

  • system DNS resolution succeeded
  • curl and a normal browser reached the deployment successfully
  • Sim Desktop logged load_failure with ERR_ADDRESS_UNREACHABLE (-109)
  • launching the unchanged release with --ip-address-space-overrides=<host>=public loaded successfully
  • a packaged build of this branch loaded the same origin without any command-line flags

Validation

  • bun run --cwd apps/desktop test -- config.test.ts
  • bun run --cwd apps/desktop lint:check
  • bun run --cwd apps/desktop type-check
  • bun run --cwd apps/desktop build
  • CSC_IDENTITY_AUTO_DISCOVERY=false bun run --cwd apps/desktop package:dir
  • packaged app launched against the private self-hosted deployment without the override flag
  • pre-push full-repository lint and type-check hooks passed

Classify only the configured self-hosted hostname as public address space so Chromium Local Network Access checks do not reject the main navigation. Keep the process-wide checks enabled for arbitrary browser destinations.
@vercel

vercel Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 7, 2026 3:52am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change affects the configured server navigation in Sim Desktop.

The PR appears safe to merge, with a non-blocking startup recovery issue that can require one extra restart.

Findings

  1. P2 Recovered server still fails ▶

Summary

This PR adds a Chromium address-space override for the configured self-hosted hostname.

  • Sim Desktop loads configured self-hosted servers on private networks.

Reviews (1) · Last reviewed commit: "fix(desktop): allow private self-hosted ..." · Reviewed by Greptile

Comment thread apps/desktop/src/main/index.ts Resolved

This branch was previously deployed

1 inactive deployment
Preview — e4ffdb2e Deployed Nov 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant