{"id":18451568,"url":"https://github.com/scotow/dropit","last_synced_at":"2025-04-08T02:32:33.811Z","repository":{"id":37849829,"uuid":"358374412","full_name":"scotow/dropit","owner":"scotow","description":"Temporary file hosting and sharing","archived":false,"fork":false,"pushed_at":"2024-02-14T19:40:34.000Z","size":406,"stargazers_count":33,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T04:11:49.257Z","etag":null,"topics":["file-sharing","file-upload","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scotow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-15T19:45:01.000Z","updated_at":"2025-01-17T20:31:21.000Z","dependencies_parsed_at":"2024-02-14T20:49:58.012Z","dependency_job_id":null,"html_url":"https://github.com/scotow/dropit","commit_stats":null,"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotow%2Fdropit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotow%2Fdropit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotow%2Fdropit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotow%2Fdropit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scotow","download_url":"https://codeload.github.com/scotow/dropit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247764804,"owners_count":20992177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-sharing","file-upload","rust"],"created_at":"2024-11-06T07:29:07.958Z","updated_at":"2025-04-08T02:32:33.493Z","avatar_url":"https://github.com/scotow.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Release](https://img.shields.io/github/v/tag/scotow/dropit?label=version)](https://github.com/scotow/dropit/tags)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/scotow/dropit/ci.yml)](https://github.com/scotow/dropit/actions)\n\n\n![Logo](banner.png)\n\n## Features\n\n- Upload files from the terminal (by using `curl` or the [shell script](https://github.com/scotow/dropit/blob/master/upload.sh))\n- Short and long aliases generation, short to copy/past and long to easily share it verbally\n- Configurable expiration based on file size\n- Quota based on users' IP addresses or usernames\n- Revocable files\n- Expiration refresh\n- Alias regeneration\n- Archive download\n- Downloads limit\n- JSON or plain text response (helpful for scripting)\n- Authenticate upload and/or download using Basic HTTP Auth or LDAP (direct bind or dn search)\n- Upload files from a minimalist web interface:\n  - Drag \u0026 drop\n  - QRCode generation\n  - Upload progress bar\n  - Readable size, duration and expiration\n  - Cache uploads links\n  - Customizable color\n  \n## Configuration\n\n### Options\n\n```\nUsage: dropit [OPTIONS] --threshold \u003cTHRESHOLDS\u003e --origin-size-sum \u003cORIGIN_SIZE_SUM\u003e --origin-file-count \u003cORIGIN_FILE_COUNT\u003e --global-size-sum \u003cGLOBAL_SIZE_SUM\u003e \u003c--ip-origin|--username-origin\u003e\n\nOptions:\n  -v, --verbose...                                                     Increase logs verbosity (Error (default), Warn, Info, Debug, Trace)\n  -u, --uploads-dir \u003cUPLOADS_DIR\u003e                                      Upload files directory path (relative) [default: uploads]\n  -U, --no-uploads-dir-creation                                        Disable upload files directory automatic creation (if missing)\n  -d, --database \u003cDATABASE\u003e                                            Metadata database path (relative) [default: dropit.db]\n  -D, --no-database-creation                                           Disable metadata database automatic creation (if missing)\n  -a, --address \u003cADDRESS\u003e                                              HTTP listening address [default: 127.0.0.1]\n  -p, --port \u003cPORT\u003e                                                    HTTP listening port [default: 8080]\n  -R, --behind-reverse-proxy                                           Use X-Forwarded-For, X-Forwarded-Proto and X-Forwarded-Host to determine uploads' origin\n  -t, --threshold \u003cTHRESHOLDS\u003e                                         Relations between files' sizes and their durations. Must be ordered by increasing size and decreasing duration\n  -o, --ip-origin                                                      Use usernames as uploaders' identities\n  -O, --username-origin                                                Use IP addresses as uploaders' identities\n  -s, --origin-size-sum \u003cORIGIN_SIZE_SUM\u003e                              Cumulative size limit from the same uploader\n  -c, --origin-file-count \u003cORIGIN_FILE_COUNT\u003e                          Number of files limit from the same uploader\n  -S, --global-size-sum \u003cGLOBAL_SIZE_SUM\u003e                              Cumulative size limit from all users\n      --auth-upload                                                    Protect upload endpoint with authentication\n      --auth-download                                                  Protect download endpoint with authentication\n  -C, --credential \u003cCREDENTIALS\u003e                                       Static list of credentials\n      --ldap-address \u003cLDAP_ADDRESS\u003e                                    URI of the LDAP used to authenticate users\n      --ldap-dn-pattern \u003cLDAP_DN_PATTERN\u003e                              LDAP DN pattern used when using single bind process\n      --ldap-search-base-dn \u003cLDAP_SEARCH_BASE_DN\u003e                      LDAP base DN used during username searches\n      --ldap-search-attribute-pattern \u003cLDAP_SEARCH_ATTRIBUTE_PATTERN\u003e  LDAP attribute(s) pattern used to match usernames during searches [default: (uid=%u)]\n      --ldap-search-dn \u003cLDAP_SEARCH_DN\u003e                                LDAP DN used to bind during username searches\n      --ldap-search-password \u003cLDAP_SEARCH_PASSWORD\u003e                    LDAP password used to bind during username searches\n  -T, --theme \u003cTHEME\u003e                                                  CSS color used in the web UI [default: #15b154]\n  -h, --help                                                           Print help information\n  -V, --version                                                        Print version information\n```\n\nHere is an example of a Dropit instance:\n\n```\ndropit \\\n  --ip-origin \\\n  --origin-size-sum 512MB \\\n  --origin-file-count 64 \\\n  --global-size-sum 10GB \\\n  --threshold 64MB:24h \\\n  --threshold 256MB:6h \\\n  --credential admin:password \\\n  --auth-upload \\\n  --behind-reverse-proxy\n```\n\n- Using uploader IP address to limit / calculate upload quota \n- Allowing at most 64 simultaneous files from the same IP\n- Allowing a total of 512MB of file content from the same IP\n- Allowing a total of 10GB of file content from anybody\n- Setting the duration of files smaller than 64MB to 24h\n- Setting the duration of files smaller than 256MB to 6h\n- Forbidding files larger than 256MB\n- Protecting upload endpoint with a basic auth and using admin/password as credentials\n- Using the X-Forwarded-For header to determine user IP address\n- Listening on default address and port (127.0.0.1:8080)\n- Creating (if needed) a directory named \"uploads\" (default) and storing uploaded files in it\n- Creating (if needed) the SQLite database \"dropit.db\" (default)\n\n### Reverse-proxy\n\nIf you host Dropit behind a reverse-proxy, make sure to use the `--behind-reverse-proxy` option and to forward the client IP, protocol and original host by setting the `X-Forwarded-For`, `X-Forwarded-Proto` and `X-Forwarded-Host` headers.    \n\n### Docker\n\nIf you prefer to run Dropit as a Docker container, you can either build the image yourself using the Dockerfile available in this repo, or you can use the [image](https://github.com/scotow/dropit/packages/737180) built by the GitHub action.\n\n```\ndocker run -p 8080:8080 docker.pkg.github.com/scotow/dropit/dropit:latest [FLAGS] [OPTIONS]\n```\n\nPlease read [Binding to all interfaces](#binding-to-all-interfaces) if you can't reach the process from outside the image.\n\n### Binding to all interfaces\n\nBy default, Dropit will only listen on the loopback interface, aka. 127.0.0.1. If you **don't** want to host Dropit behind a reverse proxy or if you are using the Docker image, you should specify the `0.0.0.0` address by using the `-a | --address` option.\n\n## Libraries\n\n- `hyper` as an HTTP backend and `axum` for routing\n- `SQLite` and `sqlx` as a metadata storage\n- `tokio` as an async runtime\n- `clap` for options parsing and usage generation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscotow%2Fdropit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscotow%2Fdropit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscotow%2Fdropit/lists"}