mirror of
https://github.com/telemt/telemt.git
synced 2026-04-16 01:54:11 +03:00
Admission-timeouts + Global Each TCP Connections
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
This commit is contained in:
@@ -100,6 +100,11 @@ pub(super) struct EffectiveUserIpPolicyLimits {
|
||||
pub(super) window_secs: u64,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(super) struct EffectiveUserTcpPolicyLimits {
|
||||
pub(super) global_each: usize,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(super) struct EffectiveLimitsData {
|
||||
pub(super) update_every_secs: u64,
|
||||
@@ -109,6 +114,7 @@ pub(super) struct EffectiveLimitsData {
|
||||
pub(super) upstream: EffectiveUpstreamLimits,
|
||||
pub(super) middle_proxy: EffectiveMiddleProxyLimits,
|
||||
pub(super) user_ip_policy: EffectiveUserIpPolicyLimits,
|
||||
pub(super) user_tcp_policy: EffectiveUserTcpPolicyLimits,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
@@ -289,6 +295,9 @@ pub(super) fn build_limits_effective_data(cfg: &ProxyConfig) -> EffectiveLimitsD
|
||||
mode: user_max_unique_ips_mode_label(cfg.access.user_max_unique_ips_mode),
|
||||
window_secs: cfg.access.user_max_unique_ips_window_secs,
|
||||
},
|
||||
user_tcp_policy: EffectiveUserTcpPolicyLimits {
|
||||
global_each: cfg.access.user_max_tcp_conns_global_each,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user