So I made a simple game where two players can connect to play together - one of them chooses the server option(and then the game starts listening for incoming TCP syncs), and the other enters the IP of the server player to establish the connection and exchange gameplay data over the TCP socket.
Usual stuff.
But the players can connect only if their computers are in the same LAN and the client enters the server's private IP address.
So I guess that if the players are in different LANs, the server must have port forward the game port(55555), and then any client can connect by entering the public IP address.
Is it true(currently I don't have the means to test it), and what are the common ways to avoid port forwarding, because most users don't know how to do it.
Or it's impossible for two applications to connect over WAN without one of the sides setting up port forwarding?