Some people have been requesting that I made TCPRelay open source. I finally decided to put it up on GitHub after adjusting the build processes for them.
Here's the Java version of TCPRelay. The latest released version is 0.1.1 beta. The current code base is 0.2 and has a few small improvements.
Here's the .NET version of TCPRelay. The latest released version is 0.4 beta 1. The latest released versions are based on this.
Have fun coding!