holepunchto / hyperswarm

A distributed networking stack for connecting peers.
https://docs.holepunch.to
MIT License
1.06k stars 85 forks source link

Add ability to load peers to use as bootstrap nodes #48

Closed cblgh closed 4 years ago

cblgh commented 4 years ago

To increase the resilience of using hyperswarm (e.g. networks being forcefully shut off, or booting into a specifically set up mesh network) it would be very useful if peers could somehow load in a list of IPs to use as introducers/bootstrap nodes for the network. Either that or just peers to connect to in general.

Similarly it would be very useful to export a list of the currently connected peers.

This has been discussed previously in

mafintosh commented 4 years ago

You can pass your own bootstrap list already using the dht options. Let me see if we expose nodes atm

cblgh commented 4 years ago

sweet! yeah exporting would be 👨‍🍳 👌

mafintosh commented 4 years ago

This landed in master with dht.getNodes, dht.addNodes

cblgh commented 4 years ago

heyyyy fantastic!