feat: depot API

This commit is contained in:
DecDuck
2025-12-20 01:11:05 +11:00
parent 89af632d84
commit 0d4c1e516f
13 changed files with 514 additions and 329 deletions
+8
View File
@@ -0,0 +1,8 @@
# Protocol
`torrential` implements the Depot API as defined by https://developer.droposs.org/web/depot, and it prefixed with `/api/v1/depot` for NGINX proxying.
It also has the following endpoints, only accessible by the Drop server for security reasons:
- `/key` for sharing the authentication key from the Drop server to torrential
- `/invalidate` for pre-emptivel clearing the download context cache. Contexts are automatically cleared regardless, so this endpoint failing is not a hard error on the Drop side
- `/healthcheck`. Does healthcheck.
+6
View File
@@ -0,0 +1,6 @@
# Structure
Torrential is a typical Rust project. Source files are in `src/`.
`handlers.rs` contains most non-download endpoint handlers. `serve.rs` contains the download endpoint handler.
`remote.rs` handles communciating with the Drop server.