Low-latency file drop web app
 
 
 
 
 
 
Go to file
xenofem 1a583983ee add collection name parameter to transbeam-cli 2022-05-29 11:12:43 -04:00
cli add collection name parameter to transbeam-cli 2022-05-29 11:12:43 -04:00
resources organize images better 2022-04-30 01:46:21 -04:00
src make TRANSBEAM_REVERSE_PROXY default to true, safe because it will bind to localhost 2022-05-29 10:54:17 -04:00
static let uploader set a collection name for a multiple-file upload 2022-05-26 15:42:11 -04:00
templates let uploader set a collection name for a multiple-file upload 2022-05-26 15:42:11 -04:00
.gitignore add quick and dirty CLI client 2022-05-24 21:45:37 -04:00
Cargo.lock allow downloading individual files from bundle 2022-05-24 15:14:31 -04:00
Cargo.toml allow downloading individual files from bundle 2022-05-24 15:14:31 -04:00
LICENSE MIT license 2022-04-28 00:49:21 -04:00
README.md storage size variable doesn't need to be a raw number of bytes 2022-05-29 11:04:01 -04:00
flake.lock flake update 2022-05-23 01:11:55 -04:00
flake.nix cachebusting and templating 2022-05-26 14:43:03 -04:00

README.md

transbeam logo: a laser warning sign in trans flag colors

transbeam

A low-latency file drop web app

features

  • One-to-many transfer of large files
  • Simple web UI for sender and receivers
  • Word-based download codes that are easy to remember and communicate
  • Receivers can begin downloading immediately, without needing to wait for the upload to finish
  • Receivers can also download after the upload is complete and the sender has gone offline
  • Easy to send multiple files at once - they're bundled into a zip file for receivers, with zero compression so extraction is quick
  • Can also download individual files out of an uploaded collection
  • Sanitises filenames, using sensible non-obnoxious defaults that should be safe across platforms
  • Rudimentary password authentication for uploading files
  • Fires a laser beam that turns you trans

configuration

transbeam is configured with the following environment variables:

  • TRANSBEAM_STORAGE_DIR: path where uploaded files should be stored (default: ./storage)
  • TRANSBEAM_STATIC_DIR: path where the web app's static files live (default: ./static)
  • TRANSBEAM_PORT: port to listen on localhost for http requests (default: 8080)
  • TRANSBEAM_REVERSE_PROXY: whether transbeam is running behind a reverse proxy (recommended), or directly exposed to the internet. If true, transbeam will only bind to localhost, and will use the Forwarded or X-Forwarded-For headers to determine client IP addresses for logs. If false, transbeam will bind on all interfaces, and will always log the peer IP address. (default: true)
  • TRANSBEAM_MAX_LIFETIME: maximum number of days files can be kept for (default: 30)
  • TRANSBEAM_MAX_UPLOAD_SIZE: maximum size of a fileset being uploaded (default: 16G)
  • TRANSBEAM_MAX_STORAGE_SIZE: maximum total size of all files being stored by transbeam (default: 64G)
  • TRANSBEAM_MNEMONIC_CODES: generate memorable download codes using English words, rather than random alphanumeric strings (default: true)
  • TRANSBEAM_UPLOAD_PASSWORD: password for uploading files. This isn't meant to be a hardcore security measure, just a defense against casual internet randos filling up your storage. I strongly recommend setting up fail2ban to throttle password attempts; transbeam logs failed attempts along with IP addresses, in the form Incorrect authentication attempt from 203.0.113.12.
  • TRANSBEAM_CACHEBUSTER: query string that will be appended to CSS and JS files, to force re-fetching of cached files when needed.
  • RUST_LOG: log levels, for the app as a whole and/or for specific submodules/libraries. See env_logger's documentation for details.

running

nix flakes

nix run git+https://git.xeno.science/xenofem/transbeam?ref=main

(The Nix package is wrapped with TRANSBEAM_STATIC_DIR set automatically to the correct Nix store path, so it'll serve the static files properly no matter what directory you run it from. TRANSBEAM_CACHEBUSTER is set automatically to a hash of the static files' store path, so it will change whenever the static files change.)

non-nix

git clone https://git.xeno.science/xenofem/transbeam
cd transbeam
cargo run --release