Git Product home page Git Product logo

tftp-http-proxy's Introduction

tftp-http-proxy

Build Status

tftp-http-proxy is a simple TFTP server that proxies all read requests to a backing HTTP server, and serves the response.

Get it

Release binaries for linux amd64 platforms are built by default and can be downloaded from the Releases page.

For other platforms or to build from source, clone the repository and just run make.

Usage

Usage of dist/tftp-http-proxy:
  -http-base-url string
    	HTTP base URL (default "http://127.0.0.1/tftp")
  -tftp-timeout duration
    	TFTP timeout (default 5s)

Details

When tftp-http-proxy is started, it will listen on (UDP) port 69 as a normal TFTP server. Whenever a new TFTP read request is received, the request will be forwarded as an HTTP request to the configured HTTP URL (-http-base-url flag). The HTTP request will have some additional HTTP headers containing information about the TFTP request:

  • X-TFTP-IP: The IP of the requesting TFTP client
  • X-TFTP-Port: The port used by the requesting TFTP client
  • X-TFTP-File: The filename requested by the TFTP client

If the HTTP request returns a status 200 response, the contents of the response will be sent as the file contents for the TFTP read request. The HTTP response should contain an accurate ContentLength header, as it will be used to set the TFTP TSize option on the read response.

If the HTTP response status is not 200, an error response will be sent to the TFTP client instead.

License

tftp-http-proxy is released under the MIT License.

tftp-http-proxy's People

Contributors

bwalex avatar mmulhern-pfpt avatar mattmulhern avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.