A simple in-memory TFTP server written in Golang. Just open up your favorite tftp client interface, and start saving your data on the TFTP server.
go get github.com/map34/simple_tftp
cd $GOPATH/src/github.com/map34/simple_tftp
glide install
or
mkdir -p $GOPATH/src/github.com/map34/simple_tftp
cd $GOPATH/src/github.com/map34/simple_tftp
cp -r <location_of_project>/* .
glide install
If you want to install the server as a binary, just do:
cd $GOPATH/src/github.com/map34/simple_tftp
go install .
To start the TFTP server.
cd $GOPATH/src/github.com/map34/simple_tftp
go run main.go
Or after installation, from the CLI, just run
simple_tftp
you will see an interface such as this:
INFO[0000] Listening UDP at [::]:52767
which means that the server is listening for incoming requests. To start storing to / reading from the server from the CLI:
$ tftp
tftp> binary
tftp> connect localhost 52767
tftp> put some_file.txt
Sent 3230 bytes in 0.0 seconds
tftp> get some_file.txt
Received 3230 bytes in 0.0 seconds
Unit test uses testify for assertion tests.
cd $GOPATH/src/github.com/map34/simple_tftp
go test tftputils/*