libp2p / libp2p/go-libp2p

Reliable AutoNat

Open
#777 2 comments 0 reactions 1 assignee View on GitHub

@willscott is already working on this.

Since Feb 27, 2020.

Epic kind/enhancement
Dominant language
Go
Stars
6.9k
Forks
1.3k
Avg merge
13d 21h
Merged PRs (30d)
1

Description

## Design notes

The AutoNAT service was written before libp2p had an event system and hasn't seen much love since. If we're going to rely on AutoNAT to reliably detect NATed nodes, we'll need to shore it up a bit:

- Instead of waiting timeouts, we should re-test when our addresses change. https://github.com/libp2p/go-libp2p-autonat/issues/34
- Address all the issues in [libp2p/go-libp2p-autonat](https://github.com/libp2p/go-libp2p-autonat/issues).
- Turn on a rate-limited AutoNAT service on all (DHT?) nodes by default. This is especially important for when we start persisting the routing table to disk and bootstrapping off that persisted routing table: we're unlikely to randomly run into an AutoNAT service node.
- We should try to advertise fewer junk addresses, either by confirming our addresses with AutoNAT or some other means.

## Testing mechanics

This will likely involve quite a bit of manual testing and testing on real NATs.

## Success Criteria
- AutoNAT is _fast_. That is, I can tell if I'm behind a nat within seconds of starting.
- AutoNAT can't be used as a mild DoS service (can't be tricked into connecting to other IP addresses).
- We can comfortably enable AutoNAT on all DHT servers without worrying about overloading them.
- AutoNAT can reliably determine that a node is dialable (i.e., reduce false positive NATs).

## TODO:
- [ ] AutoNat and Observed Address Manager https://github.com/libp2p/go-libp2p/issues/900

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.