Open neonphog opened 3 months ago
Moving these design musings down to a comment so the description can be real epic details:
register
includes query string timestamped proof of private key
forward
request bytes be sent to peer (dest peer replaced by source peer when sent out again)keepalive
periodic client sendonline
notify a peer server of client availability (after register success)offline
notify a peer server of client disconnectforward
request bytes be sent to peerkeepalive
both peer servers should periodically keepaliveClient 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:
message
an actual client message send--this is client communication relayed via the signal serverrequest_offer
a polite node wants an offer from the impolite nodeoffer
an impolite node wants to try negotiating webrtcanswer
a polite node responding to an offerice
webrtc connectivity messageopen
sent upon webrtc data channel connect success. When a node has both sent and received the open
message, it switches to sending all data over the webrtc channel. (Note, this may not be needed, data channel open is probably a good enough signal to start using it).