transbeam/README.md

63 lines
2.2 KiB
Markdown
Raw Normal View History

2022-04-27 14:03:39 -04:00
<p align="center">
2022-04-30 01:54:04 -04:00
<img alt="transbeam logo: a laser warning sign in trans flag colors" height="128" src="https://git.xeno.science/xenofem/transbeam/raw/branch/main/static/images/site-icons/transbeam.svg">
2022-04-27 14:03:39 -04:00
</p>
2022-04-27 14:23:27 -04:00
<h3 align="center">transbeam</h3>
<p align="center">A low-latency file drop web app</p>
2022-04-27 00:53:39 -04:00
## features
- One-to-many transfer of large files
- Simple web UI for sender and receivers
- 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
2022-04-28 00:31:17 -04:00
- Sanitises filenames, using sensible non-obnoxious defaults that
should be safe across platforms
2022-04-27 00:53:39 -04:00
- Fires a laser beam that turns you trans
## configuration
transbeam is configured with the following environment variables:
2022-04-30 01:53:21 -04:00
- `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_MAX_LIFETIME`: maximum number of days files can be kept for (default: 30)
- `TRANSBEAM_MAX_UPLOAD_SIZE`: maximum size, in bytes, of a fileset
being uploaded (default: 16GiB)
- `TRANSBEAM_MAX_STORAGE_SIZE`: maximum total size, in bytes, of all
files being stored by transbeam (default: 64GiB)
2022-04-28 00:54:11 -04:00
- `RUST_LOG`: log levels, for the app as a whole and/or for specific
submodules/libraries. See
[`env_logger`](https://docs.rs/env_logger/latest/env_logger/)'s
documentation for details.
2022-04-28 00:49:03 -04:00
## running
### nix flakes
```
nix run git+https://git.xeno.science/xenofem/transbeam?ref=main
```
2022-04-30 01:53:21 -04:00
(The Nix package is wrapped with `TRANSBEAM_STATIC_DIR` set automatically to the
2022-04-28 00:49:03 -04:00
correct Nix store path, so it'll serve the static files properly
no matter what directory you run it from.)
### non-nix
```
git clone https://git.xeno.science/xenofem/transbeam
cd transbeam
cargo run --release
```
2022-04-26 23:54:29 -04:00
## todo
2022-04-28 00:31:17 -04:00
- uploader auth
- downloader auth
2022-04-30 02:17:37 -04:00
- more readable download codes?
- proper error display in the web ui