Skip to content
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

Merged
merged 2 commits into from
Jan 7, 2023
Merged

add: autonat #278

merged 2 commits into from
Jan 7, 2023

Conversation

salmad3
Copy link
Member

@salmad3 salmad3 commented Jan 3, 2023

Context

Latest preview

Please view the latest Fleek preview here.

@salmad3 salmad3 marked this pull request as draft January 3, 2023 08:04
@salmad3 salmad3 added the ready for review PR is ready for review label Jan 6, 2023
@salmad3 salmad3 marked this pull request as ready for review January 6, 2023 11:20
@salmad3 salmad3 requested a review from p-shahi January 7, 2023 07:05
@salmad3
Copy link
Member Author

salmad3 commented Jan 7, 2023

thanks @p-shahi!

@salmad3 salmad3 removed the ready for review PR is ready for review label Jan 7, 2023
@salmad3 salmad3 merged commit b36aa9d into master Jan 7, 2023
@salmad3 salmad3 deleted the nat/autonat branch January 7, 2023 07:09
Copy link
Contributor

@marten-seemann marten-seemann left a 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.
Copy link
Contributor

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.
Copy link
Contributor

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

@salmad3
Copy link
Member Author

salmad3 commented Jan 7, 2023

Thanks @marten-seemann. There was no particular reason for the quick merge.

@salmad3 salmad3 mentioned this pull request Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Enhance AutoNAT doc
3 participants