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)hostandport(bind address)desktop_public_keytrust rootlog_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
- Every new socket receives an auth challenge nonce.
- A desktop client authenticates using its master key (
auth_mode=desktop) against the desktop trust root configured at startup (--desktop-pubkey). - A device client authenticates with desktop attestation + nonce signature
(
auth_mode=device). - 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2b49c2e8c9abeb75b8d28651c29d97cf4450a731c7137b975f855c6a23561ac
|
|
| MD5 |
ca0043b4172df6fab4f1d1b49cd2d472
|
|
| BLAKE2b-256 |
3f9284d3e821d47fde8dc0919ac9350250cdabc738c83be9cf8b7498f23f45e7
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7169c5137e6df14ce1c1cc708c5829b5de38a7e1805ef6c8784f171036c08f65
|
|
| MD5 |
2d650c01c6eefe4f4b2e568b48531ef0
|
|
| BLAKE2b-256 |
3fc29a49452563f7aa278ed69918c9f8a15815005daba6502fabb4265d355c96
|