Files
coder/peerbroker/proto/peerbroker.proto
T
Kyle Carberry 55784d3565 fix: Remove ICEServer proxying from client to server (#400)
This made testing simple, but enabled insecure behavior. This allows
the listener to fetch ICEServers from a remote location, which will
likely be coderd.
2022-03-06 18:41:02 -06:00

28 lines
863 B
Protocol Buffer

syntax = "proto3";
option go_package = "github.com/coder/coder/peerbroker/proto";
package peerbroker;
message WebRTCSessionDescription {
int32 sdp_type = 1;
string sdp = 2;
}
message Exchange {
oneof message {
WebRTCSessionDescription sdp = 1;
string ice_candidate = 2;
}
}
// PeerBroker mediates WebRTC connection signaling.
service PeerBroker {
// NegotiateConnection establishes a bidirectional stream to negotiate a new WebRTC connection.
// 1. Client sends WebRTCSessionDescription to the server.
// 2. Server sends WebRTCSessionDescription to the client, exchanging encryption keys.
// 3. Client<->Server exchange ICE Candidates to establish a peered connection.
//
// See: https://davekilian.com/webrtc-the-hard-way.html
rpc NegotiateConnection(stream Exchange) returns (stream Exchange);
}