Hyperswarm DHT setup
Checking your network for P2Pness
First, it's a good idea to check if your network has good "holepunching" support. We can check that using the hyperdht cli
npm i -g @hyperswarm/cli hyperswarm-discovery --ping
The above command will print a series of pongs from the network. If your pong object contains the same ip and port across responses, your network is P2P friendly and you should run a DHT node.
(Note to self, we should integrate that in the hyperdht cli :D)
Running a node
Running a dht node is as simple as installing the DHT cli.
npm i -g @hyperswarm/dht
Then to run the node do:
That's it! You probably run to run the above command as a daemon so it get's decent uptime.
The DHT node will store IPs and ports from other users through an udp interface. The network is quite redundant so no worries if you shutdown your node or if it crashes :) It also shouldn't consume too much bandwidth as it's just simple small udp messages that exchanged when peers do discovery.
Stay in touch
We might upgrade the command set in the future so it's a good idea to hang in #dat on freenode so we can share updates and you can give us feedback.
Leaving a comment here that you are running a node for a bit will help us in this early phase of the rollout also so we can stay in touch :)