vacp2p / nim-libp2p

libp2p implementation in Nim
https://vacp2p.github.io/nim-libp2p/docs/
MIT License
242 stars 52 forks source link

switch.peerInfo reports with INADDR_ANY or INADDR6_ANY multiaddresses. #1087

Closed cheatfate closed 3 weeks ago

cheatfate commented 2 months ago

nim-libp2p provides non-usable multiaddresses via switch.peerInfo. This method is used in nimbus-eth2 to report locally bound addresses to remote caller (Original issue is https://github.com/status-im/nimbus-eth2/issues/6060). But there should be a way to receive list of addresses of local interfaces. Address 0.0.0.0 or [::] should be expanded to proper local interface addresses.