ipfs.id doesn't return resolved ports for 0.0.0.0:0 addrs.0.0.0.0:0 addripfs-api and call the id methodExpected results:
The addresses field of the resulting object should contain addresses with resolved 0 addrs, however the tcp port does not get correctly resolved.
This seems to be related - https://github.com/libp2p/js-libp2p-swarm/pull/227
@dryajov can you create a test please?
@jacobheun @vasco-santos can you confirm if this is still a bug or link to a tracking issue on libp2p land?
This works for both TCP and Websockets.
For example, updating your Swarm config to:
"Addresses": {
"Swarm": [
"/ip4/0.0.0.0/tcp/0",
"/ip4/0.0.0.0/tcp/0/ws"
],
...
}
Will get you something like:
$ jsipfs swarm addrs local
/ip4/127.0.0.1/tcp/64365/ipfs/Qm
/ip4/192.168.x.x/tcp/64365/ipfs/Qm
/ip4/127.0.0.1/tcp/64366/ws/ipfs/Qm
/ip4/192.168.x.x/tcp/64366/ws/ipfs/Qm