Skip to main content

Module restream_session

Module restream_session 

Source
Expand description

Node end of a live restreamer session (A2 / A3).

The node dials C2’s uplink, OPENs a channel, then runs the inner Noise_NK handshake toward the relayed recipient key as ordinary DATA frames: msg1 goes up through C2 into the core drain, msg2 comes back down the same stream. After that every request and reply is Noise transport ciphertext, wrapped in C2’s outer layer on the way up. C2 only ever sees opaque bytes, and the node never learns what sits behind C2.

A node may open one TCP per role (g4a/PTY bridge, dedicated m4a). C2 routes downlink by (node_id, channel_id) to the TCP that OPENed that channel. On a shared TCP, a single FIFO send queue would let browser frames or a stuck mail channel wedge PTY control (head-of-line blocking). Outbound traffic is therefore queued per-channel with priority scheduling, browser frames are dropped before Noise encrypt under pressure (never dequeue already-encrypted DATA — that desyncs nonces and whitescreens HQ), and a write timeout tears the socket down so the bridge reconnects.

Structs§

NodeSession
NodeUplink
One TCP uplink to C2 carrying any number of channels. Optional UDP socket on the same peer for PTY bulk (SendPrio::Pty DATA).
UpstreamKeys
Keys C2 hands a node at enrollment: its own outer key and the upstream recipient key.

Enums§

SendPrio
Outbound priority on the shared uplink. Lower ordinal = sent first.