Description
Currently, AutoNAT seems to consider private IP addresses as possible external addresses when two peers run in the same private network. In my case, this is one computer where I run multiple instances of my code, but it is conceivable that the same happens when separate machines run in the same private network (i.e. behind the same router or within some corporate network).
I don't really know which behavior would be most appropriate. My initial guess is that non-public IP-Adresses (i.e. those for which Ipv4Addr::is_global()
or Ipv6Addr::is_global()
returns false
) should not be considered as candidates for probes, but I don't know yet whether there are use cases where private IP addresses are valid external addresses (is multi-layered NAT a thing?).
If people see this as a valid concern, it should probably be communicated to the libp2p AutoNAT spec team for inclusion in the spec.