-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix AutoNAT service for private network #6251
Conversation
4dc2a12
to
3371d1e
Compare
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.
(needs rebase)
Thanks for catching this!
1 nit, invoking P2PPNet
manually seems fine. We could try to re-use the protector from the main host, but it's probably not worth it.
1a82cbb
to
12f6bee
Compare
License: MIT Signed-off-by: Roman Khafizianov <requilence@gmail.com>
12f6bee
to
28c0013
Compare
I was able to do this way in 0.4.20, but with current |
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.
LGTM, Thanks
but with current fx refactoring, I'm not sure how to pass it
You'd need to return ipnet.Protector
from the PNet
function, and then import that in AutoNATService
as an argument, and check if it's set.. Probably not worth it, plus I'll be giving at least one more cleaning pass to these areas of code soon.
Does this functionality work as expected? I updated to the latest version of IPFS and I am not able to get the node to do the NAT traversal when I am using a swarm key.
Whereas when I don't use swarm key, I see the NAT traversal happening.
|
Please file a new bug report and include your config (minus your private key). Something looks fishy. |
Filed #7067 I see the autonat-svc used by ipfs is deprecated. Libp2p has a new autonat package that it's using. |
github.com/libp2p/go-libp2p-autonat-svc/ is now incorporated into github.com/libp2p/go-libp2p-autonat/ which acts as both the service allowing nodes to determine their nat status, and the process by which nodes go about querying other nodes to learn their status. |
fixing #6250