README | 5 ++++- main.go | 62 ++++++++++++++++++++++++++++++++++++++++------------- service/uploader/run | 2 +- ucspi.go | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/README b/README index 30e9c388c190be3d441bc8034e92bf6367f9093a..4f2abcba60381b68b0c92b2cfba300426a469233 100644 --- a/README +++ b/README @@ -11,10 +11,13 @@ http://localhost:8086/upload/ and verify integrity locally: - b2sum -a blake2b somedata.tar.gpg + b2sum somedata.tar.gpg You can enable mail notification with -notify-to and -notify-from options. It is advisable to run it under daemontools-like supervisor (http://cr.yp.to/daemontools.html). Example service/uploader provided. + +You can also run it as UCSPI-TCP service (https://cr.yp.to/ucspi-tcp.html), +like in service/uploader example. uploader is free software: see the file COPYING for copying conditions. diff --git a/main.go b/main.go index f97f4df68647fcd4ce7b5a18a17d997577b2a86a..a6109acfb6345cffcf9dae244549398394ec5237 100644 --- a/main.go +++ b/main.go @@ -35,6 +35,7 @@ "os" "os/exec" "strconv" "strings" + "sync" "time" "go.cypherpunks.ru/recfile" @@ -57,7 +58,7 @@
$ curl -F file=@somedata.tar.gpg [-F comment="optional comment"] http://.../upload/ -$ b2sum -a blake2b somedata.tar.gpg # to verify checksum +$ b2sum somedata.tar.gpg # to verify BLAKE2b-512 checksum