How to host a lobby (additional setup required) - Go1den/golf-together GitHub Wiki

Hosting a lobby requires the host to do some additional setup on their network before clients will be able to connect. As Golf Together communicates over the internet, you'll need to perform port forwarding on your router, as well as either adding an inbound rule to your firewall to allow connections from Golf Together or (not recommended) disabling your firewall. This guide will walk you through all of those steps. It should only take a few minutes of your time.

1) Port forwarding on your router

From a web browser, login to your router (typically 192.168.1.1 or 192.168.0.1 for the address). Once you are logged in, you'll have to find the Port Forwarding section, which might be hidden under a tab called "Advanced" or some such.

You'll need to add a custom rule to this port forwarding table. I chose to call the rule "Golf Together" so I could remember what it was used for. For the "device IP", you'll need to put your local IP address. This can be found by opening a command prompt in Windows and typing "ipconfig". The address you see next to "IPv4 address" in the command window is your local IP. For the external and internal ports, choose the port number you plan to host your server on (Golf Together defaults this port to 33000, but you can choose any port you want). Finally, for protocol, you can choose "Any" if it's an option, otherwise choose "TCP". Finally, make sure to Enable the rule before logging out of your router.

Note: Unless you configure your device to have a static IP, your local IP address can change depending on if you power it off, if other devices connect to your network, etc. If you are able to host a lobby one day and suddenly find you cannot get people to join your lobby on a different day, check your port forwarding table and make sure your local IP matches your current local IP.

2) Adding an inbound rule to Windows Defender firewall

This part is not needed if you disabled a firewall (but you should probably be using a firewall to keep your computer secure).

Now that you've forwarded a port, you have to tell your firewall to allow connections on the port we just forwarded.

From the Windows start menu, search for Windows Defender Firewall. Open that, and right click "Inbound Rules" on the left, and select "New Rule..."

Select "Program" and click Next.

Select "This program path" and browse to the location of golftogether.exe

Select "Allow the connection" and click Next

Make sure all the checkboxes are checked for Domain, Private, and Public, then click Next

Name the rule "Golf Together" so you can remember what it is for later on in case you want to remove it, then click Next

You should now see your rule in the list of Inbound Rules!

If you did the above two steps correctly, now you should be able to host a lobby and have people join your game.

For clients to be able to connect, they'll need to know your PUBLIC IP, and the port number you are hosting on. To find your public IP, go to a site like whatismyip.com