The cleansocks library is available in several forms.
Ubuntu is derived from the Debian distribution and uses Debian's Aptitude package manager. Two packages: libcleansocks_1.2-1.deb and libcleantlsc_1.2-1b.deb. These were built on a recent Ubuntu, but should work fine on Debian and other derivatives, such as Mint and Kali. Cleansocks is distributed in two parts, the first containing most of it, and the second the TLS client support. You'll want both for class. To install, download the files, and probably just click on them, and the GUI will figure it out how to install. To do it honestly, the command should be
Fedora uses the Red Hat Package Manager (RPM), and we have libcleansocks-1.2-1.fc40.x86_64.rpm and libcleantlsc-1.2-1.fc40.x86_64.rpm. As with the Debian These are divided into base and TLS packages, same as the Debian packages, and you'll want both for class. Download the files, and you can probably click on them, or the command is:
There is a Windows binary compiled to work with the mingw that comes with CodeBlocks. CodeBlocks uses an older version of mingw, so this download might give trouble with other compilers. There is an executable installer, cleansocksinstall.exe, for this. Download it and run it. It actually does very little; just installs the headers and library files in appropriate places. You'll still need to hook them to CodeBlocks. Instructions for settings are here, or you might try runclean.zip. For the later, open the zip and store the directory cbclean in your Documents, and the shortcut on your desktop. Clicking the shortcut should open CodeBlocks with the correct configuration. Maybe. Assuming your Windows is like the one I'm working with.
I should mention one other CodeBlocks stupidity. Many of the examples, and probably at least some of the assignments, require command-line arguments. CodeBlocks allows this only if you create a project. That's not hard, just use File/New/Project to create one. You can then right-click on the file-name tab and Add file to active project. After all that rigmarole, you can add command-line parameters using an entry under the Project menu.
If anyone wants to use Windows with a different version of mingw, let me know. I may be able to generate something usable for you. Or, you can build from source yourself. You will need the openssl library to compile cleantlsc.
There's no Mac binary distribution, but the source should build there. See below.
The binary installers all install the C++ header files and appropriate library binary files needed to compile client programs using the library. The Linux cleantlsc packages require the distribution's OpenSSL packages, so the package manager will add these if needed when cleantlsc is installed. The Windows installer includes OpenSSL and several other libraries needed to build programs. The cleantlsc RPM install requires a Fedora package which contains the root authority file. The others install a copy of the root file available here, which is the list Mozilla uses. It will be the version current when the installer was built.
The source distribution is cleansocks-1.2.tgz (or cleansocks_src-1.2.zip). The library is known to build on Linux and BSD, and should work on Mac as well. Download the file, then the build uses the standard steps:
The build requires gnu make, which will need to be installed on BSD (and possibly Mac), and then the make command changes to gmake. If you build and install on something that isn't Red Hat Linux, you might want to follow with make locroot. Run this as yourself, not the adminstrator. It will create a .cleansocks file in your home area and download the root authority file to keep cleantlsc happy.
The source distro is not set up to build on Windows. The distributed the Windows version is cross-compiled from Fedora Linux. You could probably create a project in CodeBlocks or another IDE that you prefer and get it to build that way. You could also probably build it with the above commands under MSYS on Windows, should you have that installed.
There is also a source RPM distribution, libcleansocks-1.2-1.fc40.src.rpm.
A program which uses the base library (no TLS) can be compiled with a command like:
You need the -l to say in which library to find the compiled methods. To compile a program which uses the cleantlsc, it's a tad longer: