-
Notifications
You must be signed in to change notification settings - Fork 1.1k
AutoNAT on QUIC falsely reports public NAT status #3900
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
Comments
Thank you for the detailed report. Everything above is correct. We need to add a mechanism that allows a I think the easiest way to implement this by following what #2363 did, namely to add an option to What do you think of the above suggestion @b-zee and @thomaseizinger? @b-zee would you be interested in contributing a patch? |
I know that for some reason @mxinden considers setting up a separate host for AutoNAT dials not clean, but it solves a lot of problems:
|
I am interested in contributing, but my first impression is that it's quite a difficult and large refactor (for me). This spans quite some layers conceptually and I'm not sure I am capable of making these changes. At the moment it's not top priority, but I might get around to it in the next few weeks. As far as I can see, the QUIC transport needs to open up a new listener/endpoint. And for TCP this also needs to happen when it's configured with port reuse. I am not sure what exactly is the equivalent of Go's |
A Spawning an entire new
We could consider re-implementing the basics perhaps? Like, just make a connection, negotiate security and muxer, make a single stream and then throw everything away again. In other words, do it without any of the abstractions of Other questions to answer are:
|
Without knowing rust-libp2p internals, sounds reasonable.
All of them, if possible. |
Apart from the above, I see the add-a- To address the above quoted concern, as a first iteration, I think it is fine for Again, not the ideal solution, but in my eyes the best trade-off for a first iteration. |
Works for me as well! |
@umgefahren, is this issue also perhaps solved by #4568? I think it's similar to the TCP issue of #3889.) |
I think it is solved. |
I have just verified that this is indeed not occurring anymore on current |
Thanks for checking this @b-zee! |
A node (A) behind NAT falsely gets reported to be
NatStatus::Public
by public node (B) when using AutoNAT over QUIC. This was observed with my local network machine by changing the AutoNAT example in this repository to use QUIC instead of TCP.The issue is that the peer will be able to successfully dial back, as the previous connection already paved the way: hole punching. With UDP, the source port for the first connection will be the same as what we request to be dialed back at.
The issue is in theory confirmed by @marten-seemann here:
(Another perhaps related issue is when using TCP port reuse: #3889)
The text was updated successfully, but these errors were encountered: