Documentation
¶
Overview ¶
Package turnrelay runs the optional public TURN service for WebRTC clients.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type ICEServer ¶
type ICEServer struct {
URLs []string `json:"urls"`
Username string `json:"username"`
Credential string `json:"credential"`
}
ICEServer can be passed directly to RTCPeerConnection's iceServers option.
type Relay ¶
type Relay struct {
// contains filtered or unexported fields
}
Relay owns TURN listeners, accepted connections and allocation sockets.
func Start ¶
Start binds all listeners before returning. Failure closes every acquired resource. TLS reuses the HTTPS certificate provider but runs on a separate TCP listener.
func (*Relay) Close ¶
Close also terminates idle, unauthenticated TCP/TLS clients. Pion only closes listening sockets itself, so these accepted connections are tracked separately.
func (*Relay) Credentials ¶
func (r *Relay) Credentials(user string) (Credentials, error)
Credentials issues TURN REST credentials for an authenticated application user. The shared secret stays on trusted servers, never in a browser.