Gandem / bonjour-reflector

A reflector that forwards mdns packets between VLANs - like avahi-reflector but with fine-grained control !
MIT License
175 stars 36 forks source link

Can I use this to expose Docker traffic to host and vice versa? #29

Open SHxKM opened 3 years ago

SHxKM commented 3 years ago

I have a use-case that this could be the perfect fit for but I don’t understand enough about networking to know.

On MacOS, setting Docker to use the “host” network is a no-op - docker will simply ignore this and isolate the network anyway.

I’m using a software called Home Assistant, which integrates with Apple’s HomeKit, and there’s a section for this integration specifically dealing with Docker, where usage of avahi-daemon is recommended, in reflector mode (so the HomeKit app can find the HA instance running inside docker). See Docker network isolation here: https://www.home-assistant.io/integrations/homekit

avahi-daemon is unfortunately not available for MacOS, and this library looks like it could provide similar functionality. However, at least for a networking dummy like me, its fine-grained control is a bit intimidating.

For starters I couldn’t get it to run due to some Go installation problems, but even if I did manage to run it, what would I include in the toml file? Do the devices I want to repeat mDNS for have to be defined in both sides? Where would I find their interface? And how do I know the name/ID of the VLAN they’re running on? Mind you, HA isn’t an actual device, it only emulates one.

nathanielescribano commented 1 year ago

did you ever end up figuring this out?