mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2026-10-19 23:24:17 +00:00
feat(hbbs): keep 100000 punch-request records by default
With peer ids capped at 253 bytes a full store is roughly 45 MB at worst, so a larger default keeps more console history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9dfa0610e0
commit
b0a07de9be
@@ -69,7 +69,7 @@ struct PunchReqEntry { tm: Instant, from_ip: String, to_ip: String, to_id: Strin
|
||||
static PUNCH_REQS: Lazy<TokioMutex<VecDeque<PunchReqEntry>>> = Lazy::new(|| TokioMutex::new(VecDeque::new()));
|
||||
const PUNCH_REQ_DEDUPE_SEC: u64 = 60;
|
||||
static PUNCH_REQ_MAX: Lazy<usize> =
|
||||
Lazy::new(|| get_arg("MAX_PUNCH_REQUESTS").parse().unwrap_or(10_000));
|
||||
Lazy::new(|| get_arg("MAX_PUNCH_REQUESTS").parse().unwrap_or(100_000));
|
||||
|
||||
async fn record_punch_req(from_ip: String, to_ip: String, to_id: String) {
|
||||
let max = *PUNCH_REQ_MAX;
|
||||
|
||||
Reference in New Issue
Block a user