Skip to main content

Hiro — WebSocket relay gateway server

Project description

hirogate

Hiro Gateway — WebSocket relay server.

Accepts connections from Hiro desktop servers and online apps, performs challenge/response authentication, and relays messages between authenticated devices identified by device_id.

Dev setup

hirogate is part of the hiroserver uv workspace. No separate tool install is needed — it runs directly from the workspace venv via uv run.

After cloning or pulling updated code, run from the repo root:

./dev-sync.sh

Or manually:

cd hiroserver
uv sync

Quick Start

# Create a named gateway instance (mandatory values at creation)
uv run hirogate instance create home --port 8765 --desktop-pubkey "<base64-public-key>" --set-default

# Start the instance later using only its name/default
uv run hirogate start --instance home
# or simply:
uv run hirogate

Instance model

Each gateway runs as a named instance with persistent config:

  • name (instance identity)
  • host and port (bind address)
  • desktop_public_key trust root
  • log_dir (optional override)

Instance commands:

hirogate instance list
hirogate instance show home
hirogate instance set-default home
hirogate instance remove home --purge

How it works

  1. Every new socket receives an auth challenge nonce.
  2. A desktop client authenticates using its master key (auth_mode=desktop) against the desktop trust root configured at startup (--desktop-pubkey).
  3. A device client authenticates with desktop attestation + nonce signature (auth_mode=device).
  4. Once authenticated, messages are relayed by device_id.

Message Format

{
  "target_device_id": "uuid-of-the-target-device",
  "payload": { ... }
}

If target_device_id is omitted, the message is broadcast to all connected devices.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hirogate-0.1.0.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hirogate-0.1.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file hirogate-0.1.0.tar.gz.

File metadata

  • Download URL: hirogate-0.1.0.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for hirogate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b2b49c2e8c9abeb75b8d28651c29d97cf4450a731c7137b975f855c6a23561ac
MD5 ca0043b4172df6fab4f1d1b49cd2d472
BLAKE2b-256 3f9284d3e821d47fde8dc0919ac9350250cdabc738c83be9cf8b7498f23f45e7

See more details on using hashes here.

File details

Details for the file hirogate-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hirogate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for hirogate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7169c5137e6df14ce1c1cc708c5829b5de38a7e1805ef6c8784f171036c08f65
MD5 2d650c01c6eefe4f4b2e568b48531ef0
BLAKE2b-256 3fc29a49452563f7aa278ed69918c9f8a15815005daba6502fabb4265d355c96

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page