mirror of
https://codeberg.org/YGGverse/psocks.git
synced 2026-03-31 16:35:28 +00:00
reorganize snapshot stats, implement detailed summary
This commit is contained in:
parent
9b9c47cbb9
commit
4658e2c481
3 changed files with 47 additions and 24 deletions
|
|
@ -11,14 +11,14 @@ use list::List;
|
|||
use log::*;
|
||||
use opt::{AuthMode, Opt};
|
||||
use rocket::{State, http::Status, serde::json::Json};
|
||||
use stats::{Snapshot, Total};
|
||||
use stats::{Snap, Total};
|
||||
use std::{future::Future, sync::Arc};
|
||||
use structopt::StructOpt;
|
||||
use tokio::{net::TcpListener, task};
|
||||
|
||||
#[rocket::get("/")]
|
||||
async fn index(totals: &State<Arc<Total>>) -> Json<Snapshot> {
|
||||
Json(totals.inner().snapshot())
|
||||
async fn index(totals: &State<Arc<Total>>) -> Json<Snap> {
|
||||
Json(totals.inner().snap())
|
||||
}
|
||||
|
||||
#[rocket::get("/allow/<rule>")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue