MDNS registry fix for users on VPNs (#1759)

* filter out unsolicited responses
* send to local ip in case
* allow ip func to be passed in. add option for sending to 0.0.0.0
This commit is contained in:
Dominic Wong
2020-06-30 11:12:52 +01:00
parent 3e6ac73cfe
commit 7be4a67673
4 changed files with 67 additions and 19 deletions

View File

@@ -252,7 +252,7 @@ func (m *mdnsRegistry) Register(service *Service, opts ...RegisterOption) error
continue
}
srv, err := mdns.NewServer(&mdns.Config{Zone: s})
srv, err := mdns.NewServer(&mdns.Config{Zone: s, LocalhostChecking: true})
if err != nil {
gerr = err
continue