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 email@example.com
- Connect the client to your echoserver by executing:
java -cp stunt.jar EchoClient firstname.lastname@example.org
- To connect to the Cornell EchoServer, use
email@example.com the destination when starting the client.
- If everything goes well, you'll see something along the lines of: Server:
Accepted firstname.lastname@example.org, and Client:
Greetings email@example.com, this is the EchoServer at firstname.lastname@example.org. 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.