SECURITY MODEL

A relay can forward.
It cannot read.

Phone and host always speak Noise NK end-to-end. The relay uses a second Noise NK handshake to authenticate hosts/clients and protect control frames; TLS is optional. Relay mode forwards application data as ciphertext and exposes only the routing metadata it needs.

Who sees what.

opencode stays bound to 127.0.0.1. The host reads local service registration and keeps the opencode password; the phone never receives it.

ANDROIDPhonedevice token · session data
LOCALHOSTHostopencode password · token hashes
relay: room / identity / timing · application payload ciphertext
ObserverDirectRelay
Phone ↔ host application dataNoise NK ciphertextNoise NK ciphertext
Transportws://, LAN onlyws:// + Noise NK auth; optional wss:// TLS
Relay sees—room, subject identity, connect time, frame size
Relay cannot see—prompts, replies, tool I/O, file contents
opencode passwordhost onlyhost only
01

Host creates a pair code

It carries the host Noise static public key, fingerprint, a single-use code and transport routes. Codes expire after five minutes by default.

02

Phone checks the fingerprint

The phone displays the host fingerprint. Compare it with the computer output to avoid joining an impersonated host.

03

Host returns a device token

The host stores only a hash and the device scope. The phone stores the token in Android SecureStore.

04

Each connection handshakes again

X25519 ephemeral keys complete Noise NK. OCRP control frames and proxied payloads then travel inside protected records.

Where the keys live. Where the boundary ends.

This model protects application data between phone and host. It does not defend a computer that is already compromised, nor does it hide routing metadata from the relay.

DataLocationProtection
Host Noise private key~/.config/ocremote/identity.jsonmode 0600; never leaves the host
Device tokenphone SecureStore; host stores a hashrevocable per device
Relay subject secretphone SecureStore; relay stores a hashlong-lived until revoked
Relay phone invitesone-time phone invitesbound to a room, single-use, short lived
Relay Noise static keydata/relay-identity.jsonmode 0600; public key fetched from /v1/info and pinned by the host
Optional TLS private keyOperator-provided certificate pathOnly with wss; the relay does not generate a CA
The relay can still observe who connects, when, room size and traffic patterns. Noise protects application payloads, not metadata anonymity.
BuildApplication idOptional TLS trust
Releaseapp.ocremote.androidAndroid system CA store
QAapp.ocremote.android.qasystem CA + development test CA

Noise NK needs no CA and works in every build. Only when wss:// is enabled with a self-signed certificate must that CA be installed in the Android system store, or a public CA certificate used instead.

Relay authentication & TLS troubleshooting →