portal to latire index

Premise

I created this site because I wanted a place to show my projects. The backend is written in C++ with cpp-httplib. Traffic routing was mostly handled in C++ along with a few iptables rules. The frontend is just basic HTML and CSS.

Security

The server is running as an unprivileged user, and there shouldn't be anything in the way of sensitive user information that can be divulged. E-mails are received by a separate unprivileged user and you are free to encrypt them with my public key if privacy is a concern. The private key is stored offline.

A more prescient concern is getting DOSed. This server isn't very powerful and I have limited bandwidth, so implementing a rate limit seems like a good precaution. This was done in C++ with ValKey, a FOSS Redis fork, and redis-plus-plus, a C++ Redis client. The server keeps track of when the last 100 requests were made from an IP in a circular buffer. I decided to go with the sliding window approach, so the nth request must wait for the n-100th request to be at least 60 seconds old or it will be dropped.