ssbc/dgram-broadcast

IPv6 Support

RangerMauve opened this issue · 4 comments

I was talking to some folks in the dweb camp IRC and we were discussing how to get various protocols working and it was brought up that using something like CJDNS or Yggdrasil for routing could cause problems for SSB since it's local node discovery wouldn't work.

It'd be cool if this module had a fallback to use multicast in IPv6.

I think what would need to be done is:

  • Figuring out which IPv6 address to broadcast to. Maybe the "all nodes address" described here
  • Have an option to open up the IPv6 socket in tandem to the IPv4 socket (or can it be reused?)
  • Send outgoing data to both sockets, and merge incoming data from the socket into messages in the stream
  • Test with SSB in an IPv6 network

cc @staltz

I think broadcast doesn't really apply on that kind of overlay network, I mean, you don't want the whole internet connecting to you... the local broadcast is okay because you are physically in the same space.
If you had a long term persistent network identities you'd just want a way that your friends could connect to you, i.e. some way to share your address, but not too publically.

I'd say that mesh networks in this case are local. If people are gathering at an event, wouldn't it be good to make it easy for them to discover each other without having to connect to a pub or manually find their IP addresses?

@RangerMauve yes, but cjdns and yggdrasil arn't that sort of mesh network. For a local mesh network I agree... I'm not sure how many people use these yet, but I can certainly see they are intended for millions of users.

also many mesh networks span a city. https://en.wikipedia.org/wiki/Guifi.net has "35 thousand active nodes"... you probably don't want to receive a broadcast udp packet from 35k peers every second...

You're totally right. I'm still a little concerned about how we can make it easy to discover SSB peers at DWeb Camp, but IPv6 broadcast probably isn't the best way to do it.

I'll talk about it more in the DWeb Camp repo and see what we can come up with.

Thanks!