Obiwan is a TFTP server that builds the content it serves on the fly. At the moment, it is a very barebones implementation of https://tools.ietf.org/html/rfc1350 without any bells and whistles. Content is served from memory.
Limitations: This code is super experimental at the moment and only handles GET requests.
Obiwan is built using the Haskell Stack. Grab the https://docs.haskellstack.org/en/stable/install_and_upgrade/ binary and then building is as simple as:
% stack build
To build and run the tests:
% stack build --test
To run the example, run obiwan in one terminal:
$ stack exec obiwan
Listening on 127.0.0.1:12345
In another terminal, you can use a tftp client to fetch files:
% tftp -v 127.0.0.1 12345 -m binary -c get dmesg
mode set to octet
Connected to 127.0.0.1 (127.0.0.1), port 12345
getting from 127.0.0.1:dmesg to dmesg [octet]
Received 67837 bytes in 0.0 seconds [120117784 bit/s]