Single use, long running
--wait-for-reset turns a single-use server into a long-running dead drop
where every torrent can be downloaded exactly once:
export DEADDROP_RESET_TOKEN=$(openssl rand -hex 32)deaddrop serve first.torrent --wait-for-reset
DEADDROP_KEY=<key> deaddrop fetch <ticket> # the one downloaddeaddrop reset <ticket> 'magnet:?xt=...' # any ticket from this server worksDEADDROP_KEY=<new key> deaddrop fetch <new ticket> # each torrent has its own keyLifecycle
Section titled “Lifecycle”-
The server serves the torrent to one client, as in normal single use.
-
When that client has everything and disconnects (or 30 s after it has everything), the ticket stops working and the torrent’s files are deleted. The blob store drops its copy within about 10 s. The server keeps running but serves nothing.
-
A reset downloads the next torrent and serves it once more, with a new ticket and a new key. A reset can also replace a torrent nobody has downloaded yet.
Requirements
Section titled “Requirements”- A reset token (
--reset-token,DEADDROP_RESET_TOKEN, orserve.reset_tokenin the config file). - Single use.
--wait-for-resetis ignored with--multi-use.
As a config file
Section titled “As a config file”[serve]multi_use = falsewait_for_reset = truereset_token = "<long random string>" # or DEADDROP_RESET_TOKENdata_dir = "/var/lib/deaddrop"