mirror of
https://github.com/livekit/livekit.git
synced 2026-07-29 09:49:26 +00:00
Add ice mdns config (#1311)
* Add use_mdns config * Update config-sample.yaml Co-authored-by: David Zhao <dz@livekit.io> Co-authored-by: David Zhao <dz@livekit.io>
This commit is contained in:
co-authored by
David Zhao
parent
52d15637c2
commit
bccf7a6842
@@ -98,6 +98,9 @@ rtc:
|
||||
# - 10.0.0.0/16
|
||||
# excludes:
|
||||
# - 192.168.1.0/24
|
||||
# # Set to true to enable mDNS name candidate. This should be left disabled for most users.
|
||||
# # when enabled, it will impact performance since each PeerConnection will process the same mDNS message independently
|
||||
# use_mdns: true
|
||||
|
||||
# when enabled, LiveKit will expose prometheus metrics on :6789/metrics
|
||||
# prometheus_port: 6789
|
||||
|
||||
@@ -81,6 +81,7 @@ type RTCConfig struct {
|
||||
Interfaces InterfacesConfig `yaml:"interfaces"`
|
||||
IPs IPsConfig `yaml:"ips"`
|
||||
EnableLoopbackCandidate bool `yaml:"enable_loopback_candidate"`
|
||||
UseMDNS bool `yaml:"use_mdns"`
|
||||
|
||||
// Number of packets to buffer for NACK
|
||||
PacketBufferSize int `yaml:"packet_buffer_size,omitempty"`
|
||||
|
||||
@@ -90,6 +90,10 @@ func NewWebRTCConfig(conf *config.Config, externalIP string) (*WebRTCConfig, err
|
||||
s.SetIPFilter(filter)
|
||||
}
|
||||
|
||||
if !rtcConf.UseMDNS {
|
||||
s.SetICEMulticastDNSMode(ice.MulticastDNSModeDisabled)
|
||||
}
|
||||
|
||||
var nat1to1IPs []string
|
||||
// force it to the node IPs that the user has set
|
||||
if externalIP != "" && (conf.RTC.UseExternalIP || (conf.RTC.NodeIP != "" && !conf.RTC.NodeIPAutoGenerated)) {
|
||||
|
||||
Reference in New Issue
Block a user