-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add: autonat #278
add: autonat #278
Conversation
Co-authored-by: Prithvi Shahi <[email protected]>
thanks @p-shahi! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR was merged pretty quickly. Is there any reason for that?
addresses, however, it is possible that some of these addresses are not accessible from outside the network, as the peer may be located in a private network that is behind a [NAT](overview.md) and therefore unreachable. | ||
|
||
To prevent this problem of advertising undialable addresses, libp2p has implemented a protocol called AutoNAT, which allows nodes to determine | ||
whether or not they are behind a NAT. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more about determining your position and then taking specific action based on that, for example switching to DHT server mode, or getting a reservation with a relay.
AutoNAT current can't test individual addresses (that's what my AutoNAT v2 proposal would add).
While the [identify protocol][spec_identify] described above lets peers inform each other about their observed network addresses, not all networks will allow incoming connections on the same port used for dialing out. | ||
AutoNAT allows a node to request other peers to dial its presumed public addresses. If a few of these | ||
dial attempts are successful, the node can be reasonably ascertain that it is not behind a NAT. On the other | ||
hand, if a few of these dial attempts fail, it strongly indicates that a NAT is blocking incoming connections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- if all or most of these dial attempts
Thanks @marten-seemann. There was no particular reason for the quick merge. |
Context
Latest preview
Please view the latest Fleek preview here.