TCPRelay 0.1.1 beta
As of December 15th, I will no longer update this blog. There is a new version of TCPRelay on my other blog: TCPRelay 0.3 beta.
Let me start this blog by talking about one of my simplest (and quite successful) projects: TCPRelay. This is a very simple program whose main purpose is to help users of XSplit (used to run my gaming stream) deal with some upload bandwidth issues. It started as a quick and dirty program that served as a relay between XSplit and the Twitch.tv server and became a nice little command-line tool that made a lot of people happy.
It works like this: while TCPRelay is running, it is listening to a TCP port in the local machine which is by default 1935. For every connection made to this port, a new connection will be made to the target server, the default being live.justin.tv:1935. Every byte TCPRelay receives on the local connection will be sent to the target server, and all responses made by the server will be transferred to the local connection. It is, in fact, a data relay, doing nothing but transferring data from one side to the other. XSplit users will have to go through the process of creating a custom connection to the local machine so as to make the program send and receive data through TCPRelay instead of connecting directly to the streaming servers. Some would call this a proxy, but it lacks the ability to dynamically choose the target server (which is impossible, given the network protocol used).
So now you are asking: how did this solve the upload bandwidth problem? The answer is something that eludes me and a few XSplit developers alike. Somehow, it works. I like to call it magic. See for yourself:
XSplit bandwidth test without TCPRelay
XSplit bandwidth test with TCPRelay
Amazing, huh? By the way, the game running behind it is StarCraft II: Wings of Liberty.