Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advertising a localhost address doesn't seem to work #33

Open
jangxx opened this issue Aug 10, 2023 · 3 comments
Open

Advertising a localhost address doesn't seem to work #33

jangxx opened this issue Aug 10, 2023 · 3 comments
Labels
bug Something isn't working pinned

Comments

@jangxx
Copy link

jangxx commented Aug 10, 2023

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 Screenshot 2023-08-10 015345 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

Doesn't apply

Configuration

Doesn't apply

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.

@jangxx jangxx added the bug Something isn't working label Aug 10, 2023
@github-actions
Copy link

github-actions bot commented Sep 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Sep 9, 2023
@Supereg Supereg added pinned and removed stale labels Sep 9, 2023
@jangxx
Copy link
Author

jangxx commented Sep 10, 2023

Bump I guess? This is still a problem that affects me, and even after hacking around a bit, I still can't figure out what could be causing this or how to fix it.

@Supereg
Copy link
Member

Supereg commented Sep 10, 2023

afaik this is not an issue on macOS but only windows and Linux

@jangxx jangxx changed the title Advertisting a localhost address doesn't seem to work Advertising a localhost address doesn't seem to work Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pinned
Projects
None yet
Development

No branches or pull requests

2 participants