Author Topic: Auto Port Forwarding: Part Deux  (Read 2067 times)

0 Members and 1 Guest are viewing this topic.

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Auto Port Forwarding: Part Deux
(Updated 11/30: All new rewritten code using a different library!)

This is a test build of the new automatic port forwarding feature. This is really just to test out router compatibility and how easy or difficult it is for all of you to enable support.

Win64 only, since it's hopefully a quick test. Linux binaries will be provided if needed, or you can build from source yourself.

Windows 64-bit (updated 11/29)
Github pull request

This uses PCP/NAT-PMP to automatically manage port forwarding. As such, PCP/NAT-PMP must be enabled on your router. If you don't see an option for PCP/NAT-PMP you may have to enable UPnP first. Depending on your internet provider it's possible that this will also get through carrier-grade NAT.  The auto port forwarding feature is enabled only as needed: when you create/host a game, or run a standalone server. And it's disabled as soon as it's no longer required.

A new command line option has been added for support purposes: -gateway_ip <ip_address>. Your router/gateway should be detected automatically but if not then you can specify the IP address to use (e.g., -gateway_ip 192.168.0.1). If everything works well your multi.log file will contain your public facing IP address as well as the port mapping that was enabled. All messages, including errors, will be prefixed with "Port forward =>". Debug builds will also send more diagnostic data to multi.log, so if you have problems please give that a try and send the multi.log to me.
« Last Edit: November 29, 2019, 11:34:03 pm by taylor »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Auto Port Forwarding: Part Deux
How heavily was this tested? My new connection is Double-NATted so that sounds like it would be a good test.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

  

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Auto Port Forwarding: Part Deux
It was tested as well as it could be, but that wasn't much. It didn't break anything at least. I tried on a double NAT but the connection didn't support PCP so there hasn't been a successful test there. Give it a try and let me know since I'm curious.

And this has already been merged, btw. Should be in RC2 and any nightly for the past few of weeks.