Skip to content

How It Works

Astral Travel is a remote desktop app that wraps a streaming engine and peer-to-peer tunnel into a simple two-screen interface.

GPU Detection & Encoding

When you start hosting, the app detects your GPU and selects the optimal hardware encoder:

GPUVendorEncoderCodec Priority
NVIDIA (GTX/RTX)nvidiaNVENCHEVC > H.264
AMD (Radeon)amdVAAPIHEVC > H.264
Intel (integrated/Arc)intelVAAPIH.264
Unknown/NoneSoftwareH.264

The app also auto-detects your display resolution and sets an appropriate bitrate:

  • 1080p: 20 Mbps
  • 4K: 40 Mbps
  • FPS: 60

No manual tuning required. These defaults work well for most use cases.

Encrypted Tunnel

All traffic between host and client is encrypted and travels peer-to-peer:

  1. STUN — Discovers your public IP and NAT type
  2. UPnP — Attempts automatic port mapping on your router
  3. Signaling — Exchanges connection info between peers
  4. TLS + ChaCha20 — Encrypts the tunnel

Traffic goes directly between machines whenever possible. No data passes through a relay server.

Connection Codes

The connection code (e.g. AT-ABCD-EFGH-IJKL-MNOP) encodes the information needed to establish a tunnel:

  • Host's public IP address
  • Port number
  • TLS fingerprint for verification

The code is base64url-encoded and dash-separated for readability. Share it via any messaging app — it's not sensitive beyond enabling a connection attempt, and the TLS fingerprint prevents man-in-the-middle attacks.

Architecture

┌─────────────────────────────────┐
│         Electron App            │
│  ┌───────────┐  ┌────────────┐  │
│  │  React UI │  │ Main Proc  │  │
│  │ (renderer)│◄─┤ (electron) │  │
│  └───────────┘  └─────┬──────┘  │
│                       │         │
│         ┌─────────────┼──────┐  │
│         │             │      │  │
│    ┌────▼────┐  ┌─────▼───┐  │  │
│    │ Tunnel  │  │Streaming│  │  │
│    │ (p2p)   │  │ Engine  │  │  │
│    └─────────┘  └─────────┘  │  │
└─────────────────────────────────┘
  • React UI — Three screens (home, host, client). Communicates with the main process via IPC bridge.
  • Main Process — Manages the streaming engine, GPU detection, tunnel, and auto-configuration. All process spawning happens here.
  • Tunnel — Peer-to-peer encrypted connection using STUN for NAT traversal and UPnP for port mapping.
  • Streaming Engine — Bundled and managed silently. Handles video encoding, streaming protocol, and input forwarding.

The renderer never touches system APIs directly. Everything goes through 5 IPC methods exposed on window.at.