Wi-Fi sync corner cases

  • make ssb-lan as a fork of sbot's built-in "local" plugin
  • add start() / stop() APIs to ssb-lan
  • when app starts with Wi-Fi off, then during the app Wi-Fi gets turned on, we should broadcast the new address, not the addresses we had available at startup time when os.networkInterfaces() was executed (e.g. in modules like non-private-ip)
  • attempt to use port 8008 for broadcast-stream, but if it fails, use 26830, read more below
  • (maybe?) ssb-lan should advertise on both 8008 and 26830, and listen on both too

The rationale is that 8008 is actually protocol, it's a hard requirement for interoperating with other apps, like Patchwork, but 8008 is too common of a port that it could be used by other apps in the operating system. I believe we should transition gradually to more eccentric ports that are more likely to be free.

  • 26830: UDP LAN broadcast
  • 26831: TCP server
  • 26832: DHT node
Edited by staltz