Comment by Arathorn
I'm resurrecting peer-to-peer Matrix (https://arewep2pyet.com) thanks to the Dutch government, who started funding it in October.
The main question is which P2P overlay network to use, if any: the prior incarnation used Pinecone (a variant of Yggdrasil), whereas this time we're pondering keeping it simpler and more scalable and using Matrix itself as the backbone to connect together smallish local P2P meshes - so by default you try to route via Matrix, but failing that you look on your LAN or BLE to see if you can talk directly to whoever you're addressing. Time will tell if this works :)
If you are open to suggestions, libp2p has a good amount of sdks for several languages and you can integrate kademlia for peer discovery