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

LAN Discovery #51

Open
sammacbeth opened this issue Sep 2, 2019 · 8 comments
Open

LAN Discovery #51

sammacbeth opened this issue Sep 2, 2019 · 8 comments

Comments

@sammacbeth
Copy link
Collaborator

In testing it seems that LAN Discovery is not currently working (I see no local network peers in the logs). If the discovery-channel implementation doesn't work, we could fall back to libdweb's ServiceDiscovery, at the cost of compatibility with the dat CLI and beaker.

@RangerMauve
Copy link

If there needs to be a change to how local peer discovery works, we might be able to get it into hyperswarm before it gets too widespread.

@RangerMauve
Copy link

So if there's a node module that behaves similarly to the ServiceDiscovery API, I don't think there'd be much pushback in using it in the rest of the stack. Worst case we can include it outside of hyperswarm in the SDK / etc.

@sammacbeth
Copy link
Collaborator Author

I looked into it a bit today:

Firstly, the multicast-dns module doesn't work with libdweb UDPSockets. The latter throws an error when listening to 0.0.0.0:5353. This means that no MDNS messages can be received. I'm not sure if this is a bug somewhere, or a limitation of the API.

Secondly, ServiceDiscovery from libdweb currently seems to be broken on Nightly. I'll have to look into why that is if we want to try that out.

@sammacbeth
Copy link
Collaborator Author

It seems that LAN Discovery works correctly on Linux. There I was able to discover a dat-node peer on my network. However on Mac, Windows and Android I didn't see it.

@RangerMauve
Copy link

Dang. 🤔

@sammacbeth
Copy link
Collaborator Author

libdweb ServiceDiscovery is currently broken (https://bugzilla.mozilla.org/show_bug.cgi?id=1461830), however there is a ticket to bring it back.

The simplest approach will be to get dat discovery compatible with this API (i.e. DNS-SD spec), then implementing it with ServiceDiscovery should be simple. I'm pushing to get hyperswarm/discovery to be DNS-SD compatible in order to achieve this.

@RangerMauve
Copy link

BTW, is the lan discovery working in the latest version?

@sammacbeth
Copy link
Collaborator Author

Last I checked it was working on some platforms but not others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants