feat(server): stats globais e rate limit por peer

This commit is contained in:
2026-08-05 20:53:36 -03:00
parent 45a4c1eceb
commit d9d7a25eca
8 changed files with 142 additions and 17 deletions
+2
View File
@@ -3,6 +3,7 @@ pub mod files;
pub mod health;
pub mod peers;
pub mod search;
pub mod stats;
pub mod ws;
use axum::{routing::{get, post}, Router};
@@ -16,6 +17,7 @@ pub fn router(state: SharedState) -> Router {
.route("/files/{file_id}", get(files::get_file))
.route("/announce", post(announce::announce))
.route("/peers/{file_id}", get(peers::peers))
.route("/stats", get(stats::stats))
.route("/tracker/ws", get(ws::ws_handler))
.with_state(state);