Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTURNServers = []TURNServer{
{URL: "turn:openrelay.metered.ca:80", Username: "openrelayproject", Credential: "openrelayproject"},
{URL: "turn:openrelay.metered.ca:443", Username: "openrelayproject", Credential: "openrelayproject"},
{URL: "turns:openrelay.metered.ca:443", Username: "openrelayproject", Credential: "openrelayproject"},
}
DefaultTURNServers are free public TURN relays used when no custom servers are configured. Traffic is DTLS-encrypted end-to-end; the relay sees packet sizes/IPs but not content.
Functions ¶
func DefaultPath ¶
func DefaultPath() string
Types ¶
type Config ¶
type Config struct {
Nickname string `json:"nickname"`
DataDir string `json:"data_dir"`
PrivateKeyB64 string `json:"private_key_b64,omitempty"`
// EnableBLEWebRTC allows macOS BLE discovery to upgrade the data path to WebRTC.
// Keep false when BLE must be the only cross-network channel.
EnableBLEWebRTC bool `json:"enable_ble_webrtc,omitempty"`
// TURNServers overrides the built-in Open Relay servers when non-empty.
// Set to your own coturn instance for full privacy.
TURNServers []TURNServer `json:"turn_servers,omitempty"`
}
func (*Config) ICEServers ¶ added in v0.3.2
func (c *Config) ICEServers() []TURNServer
ICEServers returns the TURN servers to use: custom if configured, otherwise defaults.
type TURNServer ¶ added in v0.3.2
type TURNServer struct {
URL string `json:"url"`
Username string `json:"username"`
Credential string `json:"credential"`
}
TURNServer holds credentials for a TURN relay server.
Click to show internal directories.
Click to hide internal directories.