Add port mapping for Slippi via UPnP or NAT-PMP #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
screenshot: https://imgur.com/a/KDD0uEr
Note that I intend to have most users set this config via my Slippi Launcher network diagnostic tool (as a follow-up to project-slippi/slippi-launcher#391)
In cases where UPnP or NAT-PMP are available, enabling this option will improve connecting to other players while behind symmetric NAT. Regardless of own NAT type, it may also help connecting with other players who are behind symmetric NAT.
Note that while we don't specifically use PCP, NAT-PMP is literally PCP version 0 and routers which nominally support only PCP may be backward compatible.
While there are some security concerns with UPnP, all 3 major consoles support it and we literally already tell users who have connection problems to enable it on their router if possible (
!connect
). In How NAT traversal works, the author notes:There's also a possibly of using port mapping to improve connections for players who are behind the same CGNAT/double NAT in the future.