DustMote-Snit is developed as part of
Tclssg. It adds the following new features to DustMote:
- Basic logging (to stdout);
- Content-Type;
- Custom route handlers;
- Directory listings;
- Path jailing (albeit not seriously tested for security);
- Content-Range (resumed transfers);
- TLS support;
- Every server is a Snit object;
- Multiple servers can run in the same Tcl interpreter;
- When run as the main script:
- Command line options are processed to configure the server;
- The server can be reloaded by accessing /reload and shut down by accessing /quit.
Known bugs and limitations:
- Canceled transfers are not logged correctly.
- Security: consider DustMote-Snit insecure and do not let it run unsupervised where you don't know who might access it.
Usage (from the command line) edit
usage: ./dustmote-snit.tcl -root value ?-host localhost? ?-port 8080? ?-default index.html? ?-verbose 1? ?-dirlists 1? ?-certfile public.pem? ?-keyfile private.pem? ?-tls 0?You can use the following shell command to generate a set of temporary SSL certificates with
OpenSSL:
openssl req -x509 -newkey rsa:2048 -nodes -keyout private.pem -out public.pem -subj '/CN=localhost' -days 1 Discussion edit
See also edit