Go to file
2024-02-28 11:13:24 -06:00
cmd Correct linter errors 2024-02-28 11:13:24 -06:00
docker Build using local source files instead of git cloning; do not strip or upx-compress the debug binary 2024-02-21 08:25:11 -06:00
vendor Move error handling to channel, display remaining time if timeout is enabled, display remaining count if count is enabled 2024-02-12 06:34:46 -06:00
.gitignore Initial commit 2022-09-18 19:03:50 -05:00
build-docker.sh Build using local source files instead of git cloning; do not strip or upx-compress the debug binary 2024-02-21 08:25:11 -06:00
build.sh Bump Go version to 1.22; remove openbsd/mips builds 2024-02-07 12:13:15 -06:00
default.pgo Update PGO profile 2024-02-13 18:16:11 -06:00
go.mod Move error handling to channel, display remaining time if timeout is enabled, display remaining count if count is enabled 2024-02-12 06:34:46 -06:00
go.sum Move error handling to channel, display remaining time if timeout is enabled, display remaining count if count is enabled 2024-02-12 06:34:46 -06:00
LICENSE Update release year 2024-01-14 12:43:04 -06:00
main.go Update release year 2024-01-14 12:43:04 -06:00
README.md Build using local source files instead of git cloning; do not strip or upx-compress the debug binary 2024-02-21 08:25:11 -06:00

About

Sometimes, you just need to send someone a file, and don't want to stand up a whole webserver.

While this tool won't help you bypass NAT or anything like that, it does solve the initial issue.

Simply point this tool at one or more file(s), and it will generate URLs others can use to download them.

It also accepts input via stdin, optionally in combination with filenames.

Filenames are prefaced by a randomly generated slug, of configurable length. Set -l|--length to 0 to disable this.

If so inclined, you can also optionally obfuscate filenames with the -r|--randomize flag.

Static binary builds available here.

x86_64 and ARM Docker images of latest version: oci.seedno.de/seednode/send:latest.

Dockerfile available here.

Usage output

Generates a one-off download link for one or more specified files.

Usage:
  send [file]... [flags]

Flags:
  -b, --bind string         address to bind to (default "0.0.0.0")
  -c, --count int           number of times to serve files
  -e, --exit                shut down webserver on error, instead of just printing error
  -h, --help                help for send
  -i, --interval duration   display remaining time in timeout at this interval (default 1m0s)
  -l, --length int          length of url slug and obfuscated filenames (default 6)
  -p, --port int            port to listen on (default 8080)
      --profile             register net/http/pprof handlers
  -r, --randomize           randomize filenames
  -t, --timeout duration    shutdown after this length of time
  -u, --url string          use this value instead of http://<bind>:<port> in returned URLs
  -v, --version             version for send

Building the Docker image

From inside the cloned repository, build the image using the following command:

REGISTRY=<registry url> LATEST=yes TAG=alpine ./build-docker.sh