Earlier quoted context omitted.
> In regards to using a DHT, that's something I have not researched. I am not sure how long an offer is valid, were you thinking of being able to update them as needed whenever you want to establish a connection? Yes. I have toyed with js-libp2p to obtain "providers" based on a key, but I believe the part of js-libp2p that allows you to participate in the DHT isn't quite done [0]. I imagine you'd make a CID that woul…
Thank you for sharing, will keep an eye out for that thread. I did some research a year ago ( https://aquigorka.net/post/how-to-find-peers-in-the-decentra... ) and going back to it I found this repo that uses the DHT to connect peers: https://github.com/mafintosh/peer-network The author is one of the main contributors to the Dat project so I'll do some catching up to see what they've come up with.
Show HN: WebRTC signalling data using QR codes
31–40 of 55 posts
Re: Show HN: WebRTC signalling data using QR codes
#32Re: Show HN: WebRTC signalling data using QR codes
#33Re: Show HN: WebRTC signalling data using QR codes
#34Earlier quoted context omitted.
This is still WebRTC, so the same limitations apply. The QR codes are used to share the `signalling data` for the WebRTC connection.
More detail: Yes, WebRTC contains several methods for routing through NATs -- ICE, STUN by default (using your browser's default STUN server), optionally TURN.
Edit: AFAICT, this isn't correct. Your browser has no notion of a "default" (or any other) STUN/TURN server. The JavaScript doing WebRTC has to specify one.
That said Google runs one, at stun.l.google.com:19302; but it isn't clear if that's something third-parties could or should make use of (or if Google even permits such activity), though it seems like plenty of examples (and perhaps even real-world uses) make use of it.
Re: Show HN: WebRTC signalling data using QR codes
#35Nice! I also now of this Android App that uses WebRTC Audio/Video without server (no Internet or DHCP needed): https://github.com/dakhnod/Meshenger I made a submission, in case somebody likes to discuss the need for serverless WebRTC: https://news.ycombinator.com/item?id=18203495 (Disclaimer: I am not the author of the App, but I helped out a bit)
> Contacts are found by taking the devices own IPv6 addresses and replacing the devices own MAC address by the contacts MAC address. You require the devices to be on the same network for this to work right?
The App uses ipv6 link local addresses (fe80::.. + mac address). But it also tries to make use the received IPv6 network prefixes. Also, the last contact address is stored. These approaches improves the probability a bit to find the contacts in other networks.
As a side note, many mesh networks are emulating a layer 2 network. With this, everybody can build up their own decentralized telephone network.
Re: Show HN: WebRTC signalling data using QR codes
#36Re: Show HN: WebRTC signalling data using QR codes
#37The flow is very similar to yours, down to the flashing QR codes! https://youtu.be/rw4f9LfqqpI?t=8
Re: Show HN: WebRTC signalling data using QR codes
#38Earlier quoted context omitted.
More detail: Yes, WebRTC contains several methods for routing through NATs -- ICE, STUN by default (using your browser's default STUN server), optionally TURN.
My browser manufacturer has a STUN server? Where can I find that? (e.g., for Chrome or Firefox) Edit: AFAICT, this isn't correct. Your browser has no notion of a "default" (or any other) STUN/TURN server. The JavaScript doing WebRTC has to specify one. That said Google runs one, at stun.l.google.com:19302; but it isn't clear if that's something third-parties could or should make use of (or if Google even permits such…
Re: Show HN: WebRTC signalling data using QR codes
#39Seems like you can only host, not join, from Mobile Safari?
Re: Show HN: WebRTC signalling data using QR codes
#40Earlier quoted context omitted.
I've worked with `js-ipfs` and their `js-libp2p`, they use a signalling server (actually two types of them): - https://github.com/libp2p/js-libp2p-webrtc-star - https://github.com/libp2p/js-libp2p-websocket-star That would be going back to using a server for the handshake. In regards to using a DHT, that's something I have not researched. I am not sure how long an offer is valid, were you thinking of being able to up…
> In regards to using a DHT, that's something I have not researched. I am not sure how long an offer is valid, were you thinking of being able to update them as needed whenever you want to establish a connection? Yes. I have toyed with js-libp2p to obtain "providers" based on a key, but I believe the part of js-libp2p that allows you to participate in the DHT isn't quite done [0]. I imagine you'd make a CID that woul…
The challenge is that multiple peers could announce under the same hash on the DHT. Thus I have code to perform a handshake to verify peers upon connecting.
Another project worth mentioning is hyperswarm [3], also created by the Dat Project folks. It's planned to be their new method of connecting peers on a DHT in Beaker Browser.
[1] https://www.npmjs.com/package/swarm-peer-server
[2] https://github.com/samuelmaddock/metastream/blob/master/app/...