Commit 31efabbe authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Disable mDNS gathering by default.

parent 86f75946
...@@ -5,6 +5,7 @@ go 1.13 ...@@ -5,6 +5,7 @@ go 1.13
require ( require (
github.com/at-wat/ebml-go v0.11.0 github.com/at-wat/ebml-go v0.11.0
github.com/gorilla/websocket v1.4.2 github.com/gorilla/websocket v1.4.2
github.com/pion/ice/v2 v2.0.7
github.com/pion/rtcp v1.2.4 github.com/pion/rtcp v1.2.4
github.com/pion/rtp v1.6.1 github.com/pion/rtp v1.6.1
github.com/pion/webrtc/v3 v3.0.0-beta.7 github.com/pion/webrtc/v3 v3.0.0-beta.7
......
...@@ -15,10 +15,12 @@ import ( ...@@ -15,10 +15,12 @@ import (
"sync" "sync"
"time" "time"
"github.com/pion/ice/v2"
"github.com/pion/webrtc/v3" "github.com/pion/webrtc/v3"
) )
var Directory string var Directory string
var UseMDNS bool
type UserError string type UserError string
...@@ -143,6 +145,9 @@ func Add(name string, desc *description) (*Group, error) { ...@@ -143,6 +145,9 @@ func Add(name string, desc *description) (*Group, error) {
if groups.groups == nil { if groups.groups == nil {
groups.groups = make(map[string]*Group) groups.groups = make(map[string]*Group)
s := webrtc.SettingEngine{} s := webrtc.SettingEngine{}
if !UseMDNS {
s.SetICEMulticastDNSMode(ice.MulticastDNSModeDisabled)
}
m := webrtc.MediaEngine{} m := webrtc.MediaEngine{}
m.RegisterCodec(webrtc.NewRTPVP8CodecExt( m.RegisterCodec(webrtc.NewRTPVP8CodecExt(
webrtc.DefaultPayloadTypeVP8, 90000, webrtc.DefaultPayloadTypeVP8, 90000,
......
...@@ -38,6 +38,7 @@ func main() { ...@@ -38,6 +38,7 @@ func main() {
"store memory profile in `file`") "store memory profile in `file`")
flag.StringVar(&mutexprofile, "mutexprofile", "", flag.StringVar(&mutexprofile, "mutexprofile", "",
"store mutex profile in `file`") "store mutex profile in `file`")
flag.BoolVar(&group.UseMDNS, "mdns", false, "gather mDNS addresses")
flag.Parse() flag.Parse()
if cpuprofile != "" { if cpuprofile != "" {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment