Documentation
¶
Overview ¶
Package stun pkg/services/stun/stun.go c2-vis-appsvc
stun-server as a pkg/services.Service. Implements RFC 3489 NAT discovery; requires two distinct IPs for full NAT-type detection (the `change-address` STUN attribute path needs the secondary).
Index ¶
Constants ¶
View Source
const Type = "stun-server"
Type is the registry key used in services.json blocks.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
PrimaryIP string `json:"primary_ip"`
SecondaryIP string `json:"secondary_ip"`
Port int `json:"port,omitempty"` // default 3478
AltPort int `json:"alt_port,omitempty"` // default 3479
LogLevel string `json:"log_level,omitempty"`
Tag string `json:"tag,omitempty"`
}
Config is the JSON configuration for the STUN server. Tiny — stun-server has no redis, no dmsg, no svcmode listener.
func ParseBlock ¶
ParseBlock decodes a services.json block into a Config.
Click to show internal directories.
Click to hide internal directories.