Compression and encryption

By Danny Arends in Website
Posted at: 10 Sep 2017, 10:07, last edited: 10 Sep 2017, 10:36

After having not touched my small web server project in two years, since there was no real need to update it. I decided to update it again, adding two new major features. DaNode now supports encryption via Let's Encrypt, and supports deflate compression.

The web server is a hobby project of mine, and is coded using the D programming language [0]. It is small (< 2000 lines of code), supports any language with stdout support (e.g. write your web site in brainfuck), and tries to be cpu and memory efficient.

Now the server also supports encryption and compression.

Compression of static files it performed automatically when starting the server, using the std.zlib from Phobos [1]. Depending on the amount of files, and their size this increases start-up time of the web server. However, doing this significantly reduces the time per request done, since less bytes have to be send down the wire.

The server now supports encryption using the Deimos library openSLL project [2]. Since the web server needs to not block on requests communication is done by non-blocking SSL BIO [3]. The server needs a private key, and certificate directory on start up.

Server Name Identification (SNI) [4] is used to serve up the correct certificate. Using SNI we can host multiple https encrypted sites from a single IP address. All my own web site [a,b,c] are now by default using https, SSL certificates are signed by the Let's Encrypt project [5].

A lot of other things have changed in the source code, however the whole project is still around 2000 lines of code (not counting APIs, Examples, Documentation, etc). You can find the project [here] on Github, if you want to make a website in brainfuck [6] or another esoteric programming language.

Last modified: 10 Sep 2017, 10:36 | Edit