Follow

Okay, am I overlooking something or would it be really trivial to adapt a Kademlia DHT to be a relay/routing protocol (for connecting to unconnectable peers in a P2P network) instead? This seems like a really obvious thing to do, but I've never seen anyone mention it?

· · Web · 1 · 1 · 0

To clarify: I'm talking about using the incremental node location mechanism to find the closest N nodes to a given key, except instead of the key being eg. a content hash, it's *also* a node ID.

And then each peer just maintains a session with the N closest publicly-connectable nodes to it, and someone wanting to connect *to* a firewalled/NATed peer finds those same N closest connectable nodes and asks one of them to relay traffic to the target peer for it.

@joepie91

i am not 100% sure if dat or in particular hyperdht/hyperswarm does it this way, but...

thats exactly what dat does.
the kademlia based dht participating odes also help with holepunching and optionaply relaying just as you initially suggested

Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.