{"id":19657818,"url":"https://github.com/gdatasoftwareag/tftp","last_synced_at":"2025-04-28T19:32:31.011Z","repository":{"id":37493871,"uuid":"431770193","full_name":"GDATASoftwareAG/tftp","owner":"GDATASoftwareAG","description":"Golang TFTP library.","archived":false,"fork":false,"pushed_at":"2025-03-27T18:00:31.000Z","size":168,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-05T10:33:26.577Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GDATASoftwareAG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-25T08:34:29.000Z","updated_at":"2025-03-27T18:00:29.000Z","dependencies_parsed_at":"2024-01-02T10:23:39.446Z","dependency_job_id":"f927c0fa-e19e-4027-b90f-79dd2246f160","html_url":"https://github.com/GDATASoftwareAG/tftp","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GDATASoftwareAG%2Ftftp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GDATASoftwareAG%2Ftftp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GDATASoftwareAG%2Ftftp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GDATASoftwareAG%2Ftftp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GDATASoftwareAG","download_url":"https://codeload.github.com/GDATASoftwareAG/tftp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251375529,"owners_count":21579463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T15:33:49.327Z","updated_at":"2025-04-28T19:32:30.694Z","avatar_url":"https://github.com/GDATASoftwareAG.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Cross-Platform TFTP Server with Configurable Request Handlers and `fs.FS` support\n\n[![Build Status](https://github.com/GDATASoftwareAG/tftp/workflows/build/badge.svg?branch=main)](https://github.com/GDATASoftwareAG/tftp/actions?query=workflow%3Abuild)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/fa9824c07d9f4be1a28b3717b6a2d01d)](https://www.codacy.com/gh/GDATASoftwareAG/tftp/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=GDATASoftwareAG/tftp\u0026amp;utm_campaign=Badge_Grade)\n[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/fa9824c07d9f4be1a28b3717b6a2d01d)](https://www.codacy.com/gh/GDATASoftwareAG/tftp/dashboard?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=GDATASoftwareAG/tftp\u0026utm_campaign=Badge_Coverage)\n\nThe TFTP Server is highly flexible for all platforms due to the Go `fs.FS` package.\nIt is currently used in production to install various servers via [PXE](https://en.wikipedia.org/wiki/Preboot_Execution_Environment).\n\nThe server supports different handlers for file delivery and comes with an already implemented one, which supports the `fs.FS` package.\nEverything you need to know to implement your own handler or just provide your custom file system can be found [here](./cmd/serve.go)\nThe default handler takes an os-specific path and ensures that all requested files are within the given path. It matches on every input.\nThe handlers are evaluated in their order of registration, so you have to register your handlers from the most to least specific `Matches()`-function.\n\n# Prerequisites\nYou need Go1.17+ and Taskfile support: `go install github.com/go-task/task/v3/cmd/task@latest`\nAfter that just run `task bootstrap` to set up all dependencies and prepare this repository\nTo see all available tasks run `task help`\n\n## Usage\nThis project uses the [cobra](https://github.com/spf13/cobra) package, so all you have to do is run `tftp help`.\nThe server provides different http endpoints for prometheus metrics or [profiling](https://pkg.go.dev/net/http/pprof). By default, they are available at:\n- :9100/metrics\n- :9100/debug/pprof/\n- :9100/debug/pprof/cmdline\n- :9100/debug/pprof/profile\n- :9100/debug/pprof/symbol\n- :9100/debug/pprof/trace\n- :9100/debug/pprof/heap\n\n\n\n## Config\nTo pass a config to the server place a `config.yaml` in one of the following folders:\n- `.`\n- `/etc/tftp`\n\nIf you do not provide any config files the server uses default values corresponding to the one in the [main.go](./cmd/main.go).\nIt is possible to overwrite the configs with environment variables.\nSimply use the `TFTP_` prefix and navigate to the config you want to override. For example:\n```console\nTFTP_FSHANDLERBASEDIR=\"\u003cyour-os-specific-path\u003e\"\nTFTP_TFTP_PORT=1234\nTFTP_METRICS_ENABLE=false\n```\n\n## Extensions\nThe TFTP Server ([RFC1350](https://datatracker.ietf.org/doc/html/rfc1350/)) supports the following extensions ([RFC1782](https://datatracker.ietf.org/doc/html/rfc1782)):\n- Transfer size option ([RFC2349](https://datatracker.ietf.org/doc/html/rfc2349))\n- Blocksize option ([RFC2348](https://datatracker.ietf.org/doc/html/rfc2348))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgdatasoftwareag%2Ftftp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgdatasoftwareag%2Ftftp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgdatasoftwareag%2Ftftp/lists"}