mirror of
https://github.com/telemt/telemt.git
synced 2026-06-13 14:31:44 +03:00
Type Route Cutovers + Reduce IP Tracker cleanup pressure
This commit is contained in:
@@ -13,7 +13,7 @@ use crate::config::{ProxyConfig, RstOnCloseMode};
|
||||
use crate::crypto::SecureRandom;
|
||||
use crate::ip_tracker::UserIpTracker;
|
||||
use crate::proxy::ClientHandler;
|
||||
use crate::proxy::route_mode::{ROUTE_SWITCH_ERROR_MSG, RouteRuntimeController};
|
||||
use crate::proxy::route_mode::RouteRuntimeController;
|
||||
use crate::proxy::shared_state::ProxySharedState;
|
||||
use crate::startup::{COMPONENT_LISTENERS_BIND, StartupTracker};
|
||||
use crate::stats::beobachten::BeobachtenStore;
|
||||
@@ -498,7 +498,7 @@ pub(crate) fn spawn_tcp_accept_loops(
|
||||
);
|
||||
let route_switched = matches!(
|
||||
&e,
|
||||
crate::error::ProxyError::Proxy(msg) if msg == ROUTE_SWITCH_ERROR_MSG
|
||||
crate::error::ProxyError::RouteSwitched
|
||||
);
|
||||
|
||||
match (peer_close_reason, me_closed) {
|
||||
|
||||
@@ -78,6 +78,11 @@ pub(crate) async fn spawn_runtime_tasks(
|
||||
stats_maintenance.run_periodic_user_stats_maintenance().await;
|
||||
});
|
||||
|
||||
let ip_tracker_maintenance = ip_tracker.clone();
|
||||
tokio::spawn(async move {
|
||||
ip_tracker_maintenance.run_periodic_maintenance().await;
|
||||
});
|
||||
|
||||
let detected_ip_v4: Option<IpAddr> = probe.detected_ipv4.map(IpAddr::V4);
|
||||
let detected_ip_v6: Option<IpAddr> = probe.detected_ipv6.map(IpAddr::V6);
|
||||
debug!(
|
||||
|
||||
Reference in New Issue
Block a user