tags:

views:

542

answers:

2

I need to establish a P2P UDP and TCP Connection between two Users. Both of them are behind a NAT.

A little research leads me to STUN, TURN and ICE.

Is there any Java solution (library) except jSTUN which seems to work only on UDP. And TURN, ICE is much better for the symmetric NAT Problem.

A: 

I suggest having a look at what Azureus uses, which is a popular bittorrent client written in Java. It has fancy UDP handling, including NAT support. You could have a dig through its source to see if it uses any 3rd-party libraries to do this.

skaffman
A: 

You could try jstunt - no longer maintained, but source seems to be available. They provide a jar with the STUNT library and example java server/client applications. From my reading, it's not native java, so this may only work on certain architectures.

John