KryoNet + STUN (NAT-punching)

121 views
Skip to first unread message

Libor Kolacek

unread,
Jul 27, 2016, 5:41:18 AM7/27/16
to kryonet-users
Hi,
Is it possible to do STUN (NAT-punching) while using KryoNet? I've created client-server communication vida KryoNet and for users with public IP works perfectly. I've used Weupnp library (https://bitletorg.github.io/weupnp/) for configure routers (which supports UPnP) and works great too! So far so good.
But many pepole does not have public IP and internet provider hide them behind router (or something), which does not supports UPnP. I found some java STUN library: https://java.net/projects/siptools/pages/UsingSTUN which should do some NAT-punching and connect two users with private IPs (I suppose). But it's pretty low level - using DatagramSockets etc... But I'm pretty happy how KryoNet works and don't want to implement my network code like this.

Is there any way, how to configure / use STUN with KryoNet? Is there any way how to NAT-punch/UDP hole punch in KryoNet's UPD communication?

Thanks in advance,
Libor

P.S. Sry for my English
Reply all
Reply to author
Forward
0 new messages