https://github.com/libp2p/go-libp2p-kad-dht/issues/147

libp2p DHT modes - Client/Server

libp2p functions to use:

// returns the diversity stats for the Routing Table.
IpfsDHT.GetRoutingTableDiversityStats()

// allows introspection of the operation mode of the DHT
// Client & Server modes; Server mode allows for answering queries
IpfsDHT.Mode()

// looks for a peer with a given ID connected to this dht and returns the peer and the table it was found in
IpfsDHT.FindLocal(id peer.ID) peer.AddrInfo

host.Peerstore().Peers()

AutoNAT

libp2p RPC

Third-party tutorials

libp2p concepts