Nokotan 0.4

Sun Jul 19 16:08:47 2026 UTC

Nokotan ver. 0.4 released.

  • -u and -g now accept user and group names instead of numeric IDs. This is done by reading /etc/passwd and /etc/group manually.
  • The program daemonizes by default, now you need to supply -f to run it in foreground.
  • It doesn't try to chroot now. Pass -c to chroot to the base directory
  • -d specifies a directory to serve, instead of -r. -V enables virtual hosts, instead of -a. Sorry for breaking backward compatibility :-D
  • The logging is quiet by default. -v and -vv increase verbosity.
  • New -e and -E flags to write log massages to error output.
  • Files' types are still hardcoded, but I added audio/mpeg for mp3 and video/mp4 for mp4. I still think about how to make this part better.
  • The most notable feature is that Nokotan generates sorted directory listings now. Thanks to dronix33 who told me about scandir(3).

The sorting is case-insensitive, and directories are put before other files.

I was afraid that Nokotan would crash when loading all entries of large directories into memory. But I created with a script a directory with 65536 files and requested it 16 times simultaneously. CPU usage was 100% but it took only about 30 megabytes of RAM. This is much less than I thought.

Enjoy!

http://en.sh.pp.ru/nokotan-dl.html