Publish dynamic multiaddress of private-network-bootstrap or isolated nodes using IPNS

For an IPFS node to be useful, it needs to let others know how to reach it. In other words, it’s gotta publish its (multi)address(es). Now, imagine two scenarios:

  1. A bootstrap node in a private network that doesn’t have a static public IP address. Can’t one publish its dynamic address without going through the troubles/costs of DDNS?

  2. A personal node behind NAT that’s only used for port-forwarding, pubsub etc., and that doesn’t need the public network (i.e. WAN DHT) for anything other than announcing its dynamic circuit-relay address. Is it really necessary to consume so much bandwidth by being a dhtclient, just for this purpose?

Wouldn’t it be better if in these use cases the dynamic multiaddresses could be published over IPNS under the self key or node ID of the corresponding node? Whoever wants to connect to that node can then simply resolve the node ID through public gateways and get the multiaddress to that node.

But how to achieve this if the node remains essentially disconnected from the public WAN DHT, either because it belongs to a private net or because it wants to save bandwidth!

Tried to tackle this with a recent command-line tool called ipfs-link. Hope you find it useful :slight_smile: