libp2p/go-libp2p-autonat

Use traceroute to determine if an AutoNAT server is acceptable

Stebalien opened this issue · 4 comments

We should consider using some form of traceroute on IPv6 to determine if a potential AutoNAT server is viable. This should be very fast because we just want to verify that we hit some public IP on the route.

If we can get this working correctly, we can skip the other heuristics (although some of them may be a good initial check).

Yeah, it looks like we may be able to do a UDP simple UDP traceroute. We're not trying to get all the way to the target, just out of our network.

They'll all be "public" IPs, so we'll need some heuristic for deciding that we've hit some router along the way with an IP that diverges significantly from those of the endpoints.

Could we get away in many cases with just latency as an estimator of being in the same network?

Ah, because IPv6... Actually, we there's no reason not to try IPv4, right (if the peer has an IPv4 address)?

Could we get away in many cases with just latency as an estimator of being in the same network?

Maybe? But I'd want to set that limit to be really short (like 1-5ms).