Also cleaned up things a bit by moving the ProxyTcp logic into a separate file and sharing it between the client and server.