No central server, only BitTorrent
WHAT?
How do two nodes on the internet communicate without each other’s addressing information?
If there’s one piece of information in common, like a server address, both nodes can connect to that.
What if there’s only a phrase in common?
In that case, both nodes could convert the phrase into an address on BitTorrent’s Mainline Distributed Hash Table and share content that way.
What’s a Distributed Hash Table?
A Distributed Hash Table (DHT) is a key value store with subpieces stored on different computers. Originally you could only find a torrent from a tracker website. The DHT was created so a client could find the torrent from the hash of the torrent, no web servers required!
This was successful, the BitTorrent Mainline DHT has been up for about fifteen years and at any given moment has more than ten million nodes online holding subchunks of the entire key value store.
Who’s doing this?
I’ve only seen two projects storing data on the DHT where the data is not related to torrents.
One is pkarr (public key address something something). You create a public/private keypair and the public key becomes your DNS name.
Second, I have a fun project that uses iroh.computer. I wanted nodes to join a gossip group from a passphrase. Iroh supports gossip, but you must know the address of another node to join the gossip group.
After much digging, I found an iroh extension, distributed-topic-tracker, that calculates a DHT bucket address from a passphrase, and now my computers can quickly connect to each other with only a pass phrase in common!
Extra spiffy details
How do you publish data on the DHT in such a way that no one else can overwrite it?
Distributed Topic Tracker has a PROTOCOL document with piles of details that you may enjoy.
Both of these tools rely on BEP44 from 2014. That means you can store a max of ~1000 bytes on the DHT.
Can I use this right now?
Yes, read the key points for pkarr.
Install the library, start contacting other nodes. Until you need NAT traversal. At that point, the easiest approach is to use iroh, as described in the road to iroh 1.0 blog post.