RBEnhanced / RB3Enhanced

Open-source plugin for Rock Band 3 providing many enhancements, fixes, and extra features.
https://rb3e.rbenhanced.rocks
GNU General Public License v2.0
57 stars 11 forks source link

NAT-PMP/PCP/UPnP port mapping support #1

Closed InvoxiPlayGames closed 10 months ago

InvoxiPlayGames commented 1 year ago

This adds support for the NAT-PMP and PCP protocols used for port mapping and the obtaining external IP address for online multiplayer.

While not implemented on every consumer router, it should help make connections easier (on both Wii via GoCentral and 360 via liveless) for those that do support either of the protocol(s), as well as having the potential to support CGNAT if the ISP cares enough to do that.

This is a draft PR as there are still a few lingering issues and uncertainties:

It would be nice in the future to have the game socket use the port given by the router here (for potential CGNAT support, or even something like multiple consoles on the same public IP), but not necessary.

This has been updated to add support for UPnP port mapping using Xam's exported functions. Tested on 1 router.