libp2p / js-libp2p-kad-dht

JavaScript implementation of the DHT for libp2p
https://libp2p.io
Other
141 stars 60 forks source link

feat: switch to server mode automatically when addresses change #473

Closed achingbrain closed 1 year ago

achingbrain commented 1 year ago

If the node is in client mode, and the self:peer:update event is emitted, and the event detail contains publicly routable addresses, switch to server mode.

If the event is emitted and we are in server mode and the event detail contains only private addresses, switch back to client mode.