Crates.io | duplo |
lib.rs | duplo |
version | 0.1.2 |
source | src |
created_at | 2023-02-19 23:41:36.463744 |
updated_at | 2023-10-15 19:15:18.999156 |
description | Web application for easy deployment of a file sharing portal in private networks |
homepage | |
repository | https://github.com/vi/duplo |
max_upload_size | |
id | 789371 |
size | 1,373,453 |
Web application for anonymous file sharing. Alternative backend for Mikhalevich/filesharing.
index.html
is searched in directories. MIME types are guessed.text/html
, which affects web security of the origin Duplo is deployed at.Deploying globally accessible instances of Duplo is not recommended.
cargo install --path .
duplo 0.0.0.0:80 -t /path/to/directory_where_old_files_disappear -p /path/to/permanent_directory
http://127.0.0.1:80/
- redirect would take you to the transient fileshare. There is no link to permanent fileshare anywhere - you need to access it by explicit URL: http://127.0.0.1:80/permanent/
. Test that some upload or text share work.It should not be tricky to deploy it as a SystemD service or in Docker.
Default quotas as 10GB and 1000 files. By default, cleanup happens at 00:00 GMT+0 and removes files older than 24 hours.
There is no option to opt out of one of the two fileshares - you can specify empty directory without write access to workaround this.
Usage: duplo <listen_socket> -t <transiet-directory> -p <permanent-directory> [--max-files <max-files>] [--max-bytes <max-bytes>] [--cleanup-time-utc <cleanup-time-utc>] [--cleanup-maxhours <cleanup-maxhours>] [--transient-title <transient-title>] [--permanent-title <permanent-title>] [--content-security-policy <content-security-policy>]
simple insecure HTTP server with anonymous file upload (including html/js upload and publication)
Positional Arguments:
listen_socket socket address to bind TCP socket and listen for including
HTTP requests
Options:
-t, --transiet-directory
serve (and upload) files from this directory at /transient/
-p, --permanent-directory
serve (and upload) files from this directory at /permanent/
--max-files maximum number of files allowed to reside in transient and
permanent directories. Default is 1000
--max-bytes maximum number of bytes allowed to reside in transient and
permanent directories. Default is 10GB
--cleanup-time-utc
time of day (UTC+0 timezone) to trigger the cleanup event
on. Default is `00:00:00`
--cleanup-maxhours
clean up files older than this number of hours from the
transient directory. Default is 24.
--transient-title page title for transient directory's filelist
--permanent-title page title for permanent directory's filelist
--content-security-policy
set this Content-Security-Policy header for served files
--help display usage information
Code in src/
directory is original and is licensed with MIT or Apache-2.0.
Code within res/
directory (e.g. jquery, dropzone.js, bootstrap) originates from multiple sources and typically have MIT-like licenses. Those files are embedded into the executable at build time.
Code in templates/
is based on filesharing-web-service, which does not specify a licence.