The Freenet ProjectFreenet is free software which lets you anonymously share files, browse and publish "freesites" (web sites accessible only through Freenet) and chat on forums, without fear of censorship. Freenet is decentralised to make it less vulnerable to attack, and if used in "darknet" mode, where users only connect to their friends, is very difficult to detect. See the Freenet Project's Website for more information. My interest was in two areas:
- FCPLib: The Freenet Client Protocol Library aims to be a platform independent, but natively compiled set of functions for storing and retrieving information to and from Freenet.
- FCPTools: The Freenet Client Protocol Tools are command-line driven programs for inserting and retrieving files to and from Freenet. The tools interact with Freenet exclusively through FCPLib.
At the time I was mainly interested in using Linux as my primary development environment in writing C/C++ programs. The Freenet software itself is written in Java, but someone had already began (and abandoned) the FCPTools and FCPLib projects. I decided to finish the projects; first by perfecting the FCPLib library and then tweaking each of the FCPTools programs to use FCPLib exclusively.Main contributions:
- Enable compilation on any system that can support GNU make.
- Factor out all redundant functionality in the client tools, and share as much as possible. For example, the same code that inserts data into Freenet for splitfiles is used later to insert metadata, meaning each operation works equally well within the chain of commands.
- Require that FCPLib be entirely self-contained so that other projects only need to include FCPLib and nothing else.
- Allow all the documented functions for inserting and retrieving to be used more than once on a handle without having to close the handle and re-open it.
- Support compilation on Microsoft Windows using Visual C++.
- Profile and eliminate any and all memory leaks so that the library can be loaded into RAM without long-term stability issues (making extensive use of Dmalloc).