ttgs is a teeny tiny gopher server. It's implemented in such a way to be as simple as possible, fitting in a single source code file, but in return you make several tradeoffs:
1. All file type guessing is based on file extensions. Magic numbers will never happen
2. File paths are limited in the name of simplicity. The longest identifier right now can be 1023 bytes long.
3. The "pretty" name is the name of the file.
4. All configuration is done at compile time by editing config.h

Aside from this, I believe that ttgs conforms to everything it must to implement the Gopher RFC. In return, you get several nice features:
1. chrooted and privilege dropped (further privilege droppin via pledge/seccomp to come possibly)
2. Easily auditable and understandable.

In addition, it now supports .map files, with the special "here.map" file replacing ttgs' automatic directory rendering if present.
ttgs' .map files are literal, there is no processing done on them at all, you're writing as if you were typing into the goher pipe.

How to install+run ttgs:

1. edit config.h. You will need to update GOPHER_HOST if you intend to expose it to the internet, set it to your domain name. The others are optional.
2. Create the gopher user and group (if you keep them in GOPHER_USER and GOPHER_GROUP)
3. Create the gopher directory. This defaults to /var/gopher and owned by gopher:gopher.
4. run make install.

ttgs will now be installed as setuid in /usr/local/bin/ if you haven't changed the PREFIX variable. It *must* be setuid root in order to chroot and to bind to the low port, however it drops root privileges as soon as those 2 tasks are completed. It runs isolated as the gopher user in its chroot otherwise.

