Over the last two days I have been researching on P2P yet again :). Last time I was working on it I got stung by STUN. I just could not make head and tail of the RFC and I was unable to find any usable implementation online. Rather I never really searched hard enough and I left that project mid way.
This time around I found a really clean implementation of STUN in python another in C# and one in Java. Sure found a lot of implementation and its quite simple unless you are on a symmetric NAT setup and that is where things start getting trickier. Also realized how simple or difficult it is to create a simple P2P application.
Also read up stuff on STUNT, the extra T is for TCP. STUN works on UDP and not TCP.