Cannot host a game without port forwarding

Kryonet(the library I am using) requires a user to be within the same network or forward their ports to host a game server.
Is there a way so users do not need to port forward while still using kryonet or are there other libraries out there that can fufill this task?

Thank you!

Yes, almost all routers support UPnP for opening ports.
Though a large proportion of these have it disabled by default.

There are several Java libraries that implement UPnP, though the only one I have experience using is Cling.
http://4thline.org/projects/cling/

In their user manual they have a rudimentary example of how to request a port mapping on a network’s NAT gateway.
http://4thline.org/projects/cling/support/manual/cling-support-manual.html#section.PortMapping

There is also Google Play Services.

Can kryonet be integrated with google play?

If not, I will probably use this API.

The best solution is to use https://ngrok.com/

This free service allows you to open a tunnel through a randomly generated URL they provide you. Locally on the machine you run an application that connects to their servers and forwards packets to and from a local port and their service.

What does ngrok do? it isn’t particularly clear from their website.
Does it relay all traffic between clients? or does it simply act as negotiator for nat hole punching?
Relaying obviously has major performance implications.

If UPnP isn’t a sufficiently encompassing solution, the OP should look at Hole punching.
Excellent explanation here:

The complete solution for nat traversal is:

1st) Test if UPnP is supported by the nat router. If not…
2nd) Attempt to hole punch a direct connection. If not…
3rd) Fall back to relaying traffic via a 3rd party server. (and inform the client that their performance will be degraded until they manually forward the ports required by your application.)

How can I setup a relay server?