https://github.com/tfc/obiwan
A TFTP server that builds its content on the fly
https://github.com/tfc/obiwan
Last synced: 9 months ago
JSON representation
A TFTP server that builds its content on the fly
- Host: GitHub
- URL: https://github.com/tfc/obiwan
- Owner: tfc
- License: agpl-3.0
- Created: 2019-03-10T23:08:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-17T15:21:02.000Z (over 7 years ago)
- Last Synced: 2025-03-03T05:28:19.614Z (over 1 year ago)
- Language: Nix
- Homepage:
- Size: 729 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Obiwan TFTP Server
[](https://travis-ci.org/blitz/obiwan)
[](https://github.com/emersion/stability-badges#experimental)

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](TFTP (rev2)) without any bells and
whistles. Content is served from memory.
**Limitations:** This code is super experimental at the moment and only handles GET requests.
## Building
Obiwan is built using the Haskell Stack. Grab the
[https://docs.haskellstack.org/en/stable/install_and_upgrade/](stack) binary and
then building is as simple as:
```sh
% stack build
```
To build and run the tests:
```sh
% stack build --test
```
## Running
To run the example, run obiwan in one terminal:
```sh
$ stack exec obiwan
Listening on 127.0.0.1:12345
```
In another terminal, you can use a tftp client to fetch files:
```sh
% 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]
```