Skip to content

Commit

Permalink
Merge pull request #2 from puhitaku/bump-go
Browse files Browse the repository at this point in the history
Bump Go version & add archs for Linux
  • Loading branch information
puhitaku authored Nov 2, 2024
2 parents b7c10a3 + f933e03 commit d834f4e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ jobs:
goarch: riscv64
- os: linux
goarch: arm
- os: linux
goarch: mipsle
- os: linux
goarch: mips64le
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.20.x'
go-version: '1.23.x'
- name: Build
env:
GOOS: ${{ matrix.os }}
Expand Down
32 changes: 14 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
[arm](https://github.com/puhitaku/tftp-now/releases/latest/download/tftp-now-linux-arm) /
[arm64](https://github.com/puhitaku/tftp-now/releases/latest/download/tftp-now-linux-arm64) /
[riscv64](https://github.com/puhitaku/tftp-now/releases/latest/download/tftp-now-linux-riscv64)
[mipsle](https://github.com/puhitaku/tftp-now/releases/latest/download/tftp-now-linux-mipsle)
[mips64le](https://github.com/puhitaku/tftp-now/releases/latest/download/tftp-now-linux-mips64le)
- macOS [amd64](https://github.com/puhitaku/tftp-now/releases/latest/download/tftp-now-darwin-amd64) /
[arm64](https://github.com/puhitaku/tftp-now/releases/latest/download/tftp-now-darwin-arm64)
- Windows [amd64](https://github.com/puhitaku/tftp-now/releases/latest/download/tftp-now-windows-amd64.exe) /
Expand All @@ -29,24 +31,6 @@
1. As a client, to write (send): `tftp-now-{OS}-{ARCH} write -remote remote/path/to/write.bin -local write.bin`


# Why

I enjoy installing OpenWrt onto routers, but one of the main challenges is transferring it to the bootloader via TFTP. To do this, a temporary TFTP server or client is necessary, but I have always struggled with setting up a TFTP server.

While macOS has an out-of-the-box TFTP server, it requires running launchctl to invoke the hidden server. The process is tricky, and I always Google for guidance.

Linux distros, on the other hand, usually don't have a built-in TFTP server. Installing tftpd via apt is an option, but it's configured for inetd by default and requires some additional configuration. Only the manpage and Google can provide guidance on how to do it properly.

As for Windows, it doesn't come with a TFTP server by default, except for the server variants. Community-based software is the first choice for Windows, and again, Google is the go-to source for finding the right software to download.

It's frustrating that setting up a TFTP server is always such a hassle. This is why I created tftp-now.


# How

Fortunately, there is a well-developed TFTP server/client implementation for Golang available at https://github.com/pin/tftp. The example code snippet provided on the site is exactly what I was looking for. However, since it's just an example, it lacks proper security checks and validation. To address this, I implemented these features myself and integrated the package into a simple CLI.


# Download & Run

Download the latest executable from [the release page](https://github.com/puhitaku/tftp-now/releases/latest). If there's no binary that runs on your system, please raise an issue.
Expand Down Expand Up @@ -78,3 +62,15 @@ Example (write): send 'bar' to '{server root}/dir/foo' of 192.168.1.1.
$ tftp-now write -host 192.168.1.1 -remote dir/foo -local bar
```


# Why

I enjoy installing OpenWrt onto routers, but one of the main challenges is transferring it to the bootloader via TFTP. To do this, a temporary TFTP server or client is necessary, but I have always struggled with setting up a TFTP server.

While macOS has an out-of-the-box TFTP server, it requires running launchctl to invoke the hidden server. The process is tricky, and I always Google for guidance.

Linux distros, on the other hand, usually don't have a built-in TFTP server. Installing tftpd via apt is an option, but it's configured for inetd by default and requires some additional configuration. Only the manpage and Google can provide guidance on how to do it properly.

As for Windows, it doesn't come with a TFTP server by default, except for the server variants. Community-based software is the first choice for Windows, and again, Google is the go-to source for finding the right software to download.

It's frustrating that setting up a TFTP server is always such a hassle. This is why I created tftp-now.

0 comments on commit d834f4e

Please sign in to comment.