-
Notifications
You must be signed in to change notification settings - Fork 436
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
autonat and upnp-nat both detect external IP address, but neither updates announced addresses. #2454
Comments
When confirming an observed address, the AutoNAT protocol requires several confirmations from a diverse range of network peers. This is by design to make it harder to trick your node into thinking it's listening on addresses that it is not.
How long did you leave the node running when you observed this? It can take a little while before the address is confirmed. |
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days. |
This issue was closed because it is missing author input. |
Version:
├── @libp2p/[email protected]
├── @libp2p/[email protected]
├── [email protected]
Platform:
linux
Subsystem:
addressManager, AutoNAT, and UPNP.
Severity:
Considering js-libp2p as the transport layer for a peer-to-peer app running on a personal computer, and how users expect to configure p2p apps like bittorrent.
High - The main functionality of the application does not work, API breakage, repo format breakage, etc.
Medium - A non-essential functionality does not work, performance issues, etc.
Description:
Most peer-to-peer apps are run on personal computers instead of servers. Consider Bittorrent clients like qbittorrent, utorrent, vuze, etc.
These allow users to change the address, port, and upnp settings while the application is running.
Both autonat and upnp-nat detect a nodes public ip, but neither update the announce addresses in addressManager or candidates used by autonat.
This means an application using js-libp2p must detect these through other means or manage a restart of libp2p.
autonat detects them from peers and updates addressManager's observedAddrs, but it doesn't appear to update the candidates with the new IP address.
upnp-nat gets client.externaIp() and updates observed addrs but my client's
libp2p.getMultiaddrs()
never update.Maybe I'm missing something but I don't see a way to use this information to reconfigure the js-libp2p other than to:
The statically configured listen addresses are already templates 0.0.0.0 and port 0 are replaced with local interfaces. It would be great if libp2p could do this with announce addresses as well.
What I'd like is to configure libp2p with these options:
When autoNAT observes an externalIP, it calls
addressManager.autoAnnounce(ip)
.addressManager iterates transports to create addresses. These are then verified by autoNAT.
When uPnPNAT observes an externalIP/port it calls
addressManager.autoAnnounce(ip, port)
addressManager iterates transports to create addresses. These are then verified by autoNAT.
If addressManager remembers it's announced IP's, it could also do a port change with
addressManager.autoAnnounce(undefined, port)
This would be a large change and may or may not be wanted.
Steps to reproduce the error:
Look at how other peer-to-peer applications configure their networking
https://vpn.ac/images/tutorials/socks5/qbittorrent1.png
https://www.bolehvpn.net/images/utorrent1.jpg
https://imgur.com/MQ4zkcA
The text was updated successfully, but these errors were encountered: