holochain / sbd

Simple websocket-based message relay servers and clients
Apache License 2.0
2 stars 0 forks source link

[EPIC] Signal Server Facilitates Relay + Removal of TURN #20

Open neonphog opened 3 months ago

neonphog commented 3 months ago
stateDiagram-v2
direction LR
state "Signal Connect" as sc
state "Relay Messages via Signal" as rms
state "Try Open WebRTC" as rtc
note left of rtc: STUN only
state rtc_ok <<choice>>
state "Relay Messages via WebRTC" as rmrtc
sc --> rms
sc --> rtc
rtc --> rtc_ok
rtc_ok --> rms: error
rtc_ok --> rmrtc: success
neonphog commented 2 months ago

Moving these design musings down to a comment so the description can be real epic details:


Signal Server Protocol

Limiting

Back Channel Protocol


Signal Client Protocol

Client protocol is sodium secret stream based with logic to respect rate-limits and buffer messages into batch sends without going over the max message size returned by the server. Within the encryption are framed message types: