Subject: [Ietf-behave] Announcing: TCP NAT Traversal Library

From: Saikat Guha <[email-masked]>
Date: Sun, 25 Sep 2005 07:24:33 -0700 (PDT)

Hi all,
(apologies if you get multiple copies of this)

I'd like to announce the availability of a open-source TCP NAT
Traversal/Hole-Punching library based on our research published in [1].

[1] "Characterization and Measurement of TCP Traversal through NATs 
     and Firewalls", S. Guha and P. Francis. IMC 2005.
http://nutss.net/pub/imc05-tcpnat.pdf

The key result of the paper is: TCP NAT Traversal can work 85%-90% of
the time today (without any special assumptions on NATs), and 100% of
the time between pairs of certain well-behaved NATs. See [1] for more
details.

An open-source Java library for TCP NAT Traversal is now available: 
 binaries: http://nutss.net/stunt.jar
 source: http://nutss.net/jstunt_cvs.php
 documentation for library users: http://nutss.net/jstunt/doc
 documentation for library developers: http://nutss.net/jstunt/devdoc

The above library has been tested for pair-wise connectivity across 11
brands of NATs from Windows and Linux hosts. NATs tested were Linksys,
DLink, Netgear, Belkin, 3Com, Netopia, Allied Telesyn, SMC, Trendnet,
USR. Out of the 121 possible pair-wise combinations, 113 connections are
successful. The only ones that failed are when both the endpoints are
behind the _same_ NAT that does not support TCP hairpin-behavior yet
(see [1]). 

The java library is released under LGPL; contact me if this does not
meet your needs. Feel free to extend it/port it etc.

For P2P developers and users of the library
--------------------------------------------
The JAR file above includes a sample echo-server/client program. The
source code for the sample applications is at
http://nutss.net/EchoServer.java and http://nutss.net/EchoClient.java
respectively. To start the server, on a host behind a NAT, execute: 
        java -cp stunt.jar EchoServer you@xxxxxxxxxxxxxxx
To connect to your echoserver from a client, execute:
        java -cp stunt.jar EchoClient you@xxxxxxxxxxxxxxx
(if you cannot run your own echo server, try pointing the client to the
one I am running at echo@xxxxxxxxx)

If everything goes well, you'll see something along the lines of:
On Server: Accepted saikat930@xxxxxxxxxxxxxxxxxxx
On Client: Greetings saikat930@xxxxxxxxxxxxxxxxxxx, this is the
           EchoServer at echo@xxxxxxxxxx Now you say something.
On the client, you'll be able to type lines and have it be echoed by the
server when you press enter. The library takes between 200ms to 1 second
to connect, but slow DNS (sometimes due to the NAT) can increase the
connection time by a bit.

For people who want to develop the library further
--------------------------------------------------
Anonymous CVS access is at: 
        cvs -d :pserver:anonymous@xxxxxxxxxxxxxxxxxxxxxx:/cvsroot/nutss
        checkout stunt_java
The TCP hole-punching code and state machine are in the file
STUNTCont.java. Extensive online documentation of all internal functions
is provided. Things to do:
- Wrap a java Sockets or Channels api around the existing API
- Port to C, Python etc (may require writing a separate STUNT server)
- Implement SIP backend for signaling messages (framework glue in place)
- Implement some ICE-type negotiations for stacks of NATs
- Integrate UDP hole-punching

If you have any questions, comments, suggestions, or problems, do not
hesitate to contact me. Cheers and have fun.
-- 
Saikat