Analysis
Running this minimal example
import { getResponder } from "@homebridge/ciao";
const responder = getResponder();
const service = responder.createService({
name: "Example Service",
type: "http",
port: 8080,
});
service.advertise().then(() => {
console.log("Service advertised");
});
does not advertise the service on 127.0.0.1, even though it should. Using restrictedAddresses: [ "127.0.0.1" ] causes the service to not be advertised at all instead. I verified this both with the zeroconfServiceBrowser
and the Bonjour Browser. It correctly advertises on the IPv4 and IPv6 addresses on my Ethernet card, but not on 127.0.0.1.
Expected Behavior
The service be advertised on 127.0.0.1 and ::1 (if IPv6 is not disabled). If restrictedAddresses is used it should still be advertised.
Steps To Reproduce
Just running the minimal example mentioned above is enough.
Logs
Configuration
Environment
- OS: Windows 10 Pro 22H2
- Software: n/a
- Node: v18.17.1
- npm: 9.6.7
Process Supervisor
not applicable
Additional Context
I'm not trying to use this library for homebridge, but as a generic mDNS server instead, since it seems to be the only one that supports typescript and is also not dependent on any native code.
Analysis
Running this minimal example
does not advertise the service on 127.0.0.1, even though it should. Using
and the Bonjour Browser. It correctly advertises on the IPv4 and IPv6 addresses on my Ethernet card, but not on
restrictedAddresses: [ "127.0.0.1" ]causes the service to not be advertised at all instead. I verified this both with the zeroconfServiceBrowser127.0.0.1.Expected Behavior
The service be advertised on
127.0.0.1and::1(if IPv6 is not disabled). IfrestrictedAddressesis used it should still be advertised.Steps To Reproduce
Just running the minimal example mentioned above is enough.
Logs
Configuration
Doesn't applyEnvironment
Process Supervisor
not applicable
Additional Context
I'm not trying to use this library for homebridge, but as a generic mDNS server instead, since it seems to be the only one that supports typescript and is also not dependent on any native code.