holepunchto / hyperswarm

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

Add ability to toggle different layers of hyperswarm on/off #47

Open cblgh opened 4 years ago

cblgh commented 4 years ago

it would be great for many usecases to control if hyperswarm is on or off for e.g. battery reasons. this can be extended to toggling on/off different layers:

this has been something both cabal https://github.com/cabal-club/cabal-cli/issues/113 and peermaps has been discussing and thinking about

an example from the issue above of what would be desirable from e.g. within cabal:

 archive.setNetworking(['mdns','dht']) // options: mdns, tracker, dht. use [] for none.
christianbundy commented 4 years ago

Hopefully this isn't the wrong place to ask: which strategies does hyperswarm use to find peers? The readme only mentions DHT, but I found this issue when I searched the repo for "mdns".

mafintosh commented 4 years ago

DHT and mdns. If we only say DHT in docs we should fix it