Skip to content

Platforms

Restura ships from a single React renderer to three targets. The workspace and request model are shared; network, storage, and native capabilities differ where the platform requires it.

TargetHow it runsWhere data lives
WebSPA on Cloudflare Pages, requests proxied through a Cloudflare Worker on api.restura.dev.IndexedDB (browser).
DesktopElectron app on macOS / Windows / Linux. Requests sent from the main process (HTTP via undici).Dexie, AES-GCM, key wrapped by the OS keychain. Secret material is a separate electron-store.
Self-hostedSingle Node container that serves both the SPA and the API proxy on one port.IndexedDB (browser); the server is stateless.

The browser sandbox can’t expose raw TCP, custom CAs, or SOCKS. Restura surfaces this as “Desktop only” badges on UI fields whose underlying capability isn’t available on the platform you’re using. PAC proxy scripts are not yet wired end to end on either target.

  • Kafka (produce / consume — needs raw TCP + SASL).
  • MQTT (publish / subscribe — needs raw TCP/TLS).
  • WebSocket custom handshake headers (the browser WebSocket API can’t set upgrade headers).
  • MCP http-sse transport (rejected in web mode; use streamable-http on web).
  • mTLS client certificates — sign with a client cert.
  • SOCKS5 proxies.
  • Custom CA bundle / disable TLS verification.
  • DNS pinning on HTTP, gRPC, WebSocket, SSE, Socket.IO, MCP, and MQTT. Kafka bootstrap brokers are still pre-flight only.
  • Filesystem-backed collections + git operations on a workspace.
  • OS keychain storage for encryption keys (via safeStorage).
  • Local mock HTTP server, system tray, native notifications.
  • AI assistant — request-aware chat (Electron-first, streams over IPC; no Worker /api/ai route).
  • AI Lab — prompt/model testing workbench with dataset evals, agent suites, and LLM-as-judge, against local and cloud models.

HTTP/REST, GraphQL, gRPC (unary and server streaming over the Connect protocol; server streaming needs upstream CORS, and client/bidi streams are desktop-only), WebSocket, basic SSE, MCP over streamable-HTTP, Socket.IO emit / listen / ack, collections, environments, workflows, scripts, persistent local storage, and the SSRF guard (an in-app check for the browser-direct socket protocols on web — see below). Web persistence is plaintext IndexedDB; OS-keychain-backed encryption is desktop-only.

On web, the SPA on Cloudflare Pages calls https://api.restura.dev/api/... (VITE_WORKER_URL) — a different origin, allowed through a CORS allowlist (ALLOWED_ORIGIN). A relative /api/* is the dev and self-host shape. The Worker performs SSRF validation, applies the auth signing, and forwards to the upstream. (Only the self-hosted Node server serves the SPA and /api/* from one origin.)

WebSocket, Socket.IO and GraphQL WebSocket subscriptions are the exception: on web they connect browser-direct, so the Worker’s SSRF guard never sees them. Restura applies an in-app check instead — loopback (localhost, 127.0.0.1, ::1), private-network (RFC 1918, link-local, CGNAT) and cloud-metadata targets are refused unless you turn on Settings → Security → Allow private / internal IPs (cloud metadata stays blocked regardless), and Restura asks for confirmation before sending credentials over unencrypted ws:// / http://.

gRPC server streaming over the Connect wire protocol also connects browser-direct on web (that is why it needs upstream CORS). It runs assertBrowserGrpcStreamTarget first: the same private-network check as the other browser sockets, and a production build refuses cleartext http://. gRPC unary calls and gRPC-Web server streaming go through the Worker.

On desktop, the renderer talks to the Electron main process over a context-isolated IPC bridge (window.electron). HTTP uses undici. The other native protocols use Node net / tls.

On self-hosted, the same Hono app that runs in the Worker runs in a Node process via worker/node-entry.ts. One process serves both the SPA and /api/* on one port.

All three paths share the same protocol cores in shared/protocol/ — see Architecture / Shared protocol layer.

  • Just exploring an API? Use the web app.
  • Need Kafka, mTLS, custom CAs, SOCKS proxies, or proper DNS-rebind protection? Download the desktop app.
  • Want to run it inside your VPC behind your reverse proxy? Use the Docker image.