Skip to content

feat: add swarm addrs autonat command#11184

Merged
lidel merged 5 commits intoipfs:masterfrom
2color:add-swarm-addrs-autonat
Feb 6, 2026
Merged

feat: add swarm addrs autonat command#11184
lidel merged 5 commits intoipfs:masterfrom
2color:add-swarm-addrs-autonat

Conversation

@2color
Copy link
Member

@2color 2color commented Feb 6, 2026

What

Add a new debug method to determine if your node's reachability status for each IP with the help of AutoNAT v2

  • feat: add swarm addrs autonat command
  • test: add test for ipfs swarm addr autonat command

Why

[lidel triaged bunch of historical issues that are more or less solved by this utility, allowing users to self-service and debug]

Related

fixes ipfs#11171 by adding a self service way to debug public reachability
with autonat
@2color 2color requested a review from a team as a code owner February 6, 2026 12:00
- fix help text to show capitalized reachability values (Public, Private,
  Unknown) matching actual output from network.Reachability.String()
- default Reachability to "Unknown" instead of empty string when the
  host interface assertion fails
- extract multiaddrsToStrings and writeAddrSection helpers to
  deduplicate repeated conversion loops and text formatting blocks
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, works as expected. Thanks for putting this together @2color, very useful command.

I pushed a small cleanup commit on top:

  • fixed help text example to show capitalized reachability values (Public, Private, Unknown) to match actual network.Reachability.String() output
  • default Reachability to "Unknown" instead of empty string when the host interface assertion fails
  • extracted multiaddrsToStrings and writeAddrSection helpers to deduplicate repeated loops

I'm going to include it in 0.40.0-rc1 (I am about to start release dance, so this was perfect timing!)

@lidel lidel mentioned this pull request Feb 6, 2026
67 tasks
@lidel lidel merged commit f57d13c into ipfs:master Feb 6, 2026
33 of 35 checks passed
@lidel lidel added the iteration/2026-q1 On maintainer radar for Q1 2026 label Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment