IMPORTANT NOTICE: Code for this project is no longer maintained, and is released to the public domain. The NAT testing and classification server, however, will continue to operate. The concepts behind this work are being rolled in ICE-TCP, which we expect will find it's way into various open-source libraries such as PJNatH and libJingle. Feel free to contact Saikat if you have general questions about TCP NAT traversal.
Echo Server and Echo Client
- Download and install Java 1.5.0 or later
- Download the JAR package that contains the STUNT library and example server/client applications.
- The source code for the sample applications is at EchoServer.java and EchoClient.java.
- Start the server, on a host behind a NAT, by executing:
java -cp stunt.jar EchoServer firstname.lastname@example.org
- Connect the client to your echoserver by executing:
java -cp stunt.jar EchoClient email@example.com
- To connect to the Cornell EchoServer, use
firstname.lastname@example.org the destination when starting the client.
- If everything goes well, you'll see something along the lines of: Server:
Accepted email@example.com, and Client:
Greetings firstname.lastname@example.org, this is the EchoServer at email@example.com. Now you say something.
- You'll be able to type lines at the Client's console and have them 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.