pub struct ConnectionEvent {Show 27 fields
pub timestamp: OffsetDateTime,
pub duration_ms: u64,
pub conn_id: u64,
pub peer_ip: IpAddr,
pub peer_port: u16,
pub user_id: String,
pub auth_result: AuthResult,
pub target_type: TargetType,
pub target_host: String,
pub target_port: u16,
pub sni: String,
pub bytes_sent: u64,
pub bytes_recv: u64,
pub packets_sent: u64,
pub packets_recv: u64,
pub protocol: Protocol,
pub transport: Transport,
pub close_reason: CloseReason,
pub is_fallback: bool,
pub peer_country: String,
pub peer_region: String,
pub peer_city: String,
pub peer_asn: u32,
pub peer_org: String,
pub peer_longitude: f64,
pub peer_latitude: f64,
pub server_id: String,
}Expand description
A connection event representing the full lifecycle of a single connection.
Fields§
§timestamp: OffsetDateTimeConnection start time (UTC).
duration_ms: u64Connection duration in milliseconds.
conn_id: u64Connection ID (unique within server instance).
peer_ip: IpAddrClient IP address.
peer_port: u16Client port.
user_id: StringUser identifier (password hash prefix or custom ID).
auth_result: AuthResultAuthentication result.
target_type: TargetTypeTarget address type.
target_host: StringTarget host (IP or domain).
target_port: u16Target port.
sni: StringSNI (Server Name Indication), if available.
bytes_sent: u64Bytes sent (client → server → target).
bytes_recv: u64Bytes received (target → server → client).
packets_sent: u64Packets sent (UDP only).
packets_recv: u64Packets received (UDP only).
protocol: ProtocolProtocol type.
transport: TransportTransport layer.
close_reason: CloseReasonConnection close reason.
is_fallback: boolWhether this was a fallback connection.
peer_country: StringSource country ISO 3166-1 alpha-2 code (e.g., “CN”, “US”).
peer_region: StringSource region/state/province (e.g., “Shanghai”, “California”).
peer_city: StringSource city (e.g., “Shanghai”, “Los Angeles”).
peer_asn: u32Source ASN number (e.g., 4134).
peer_org: StringSource ASN organization (e.g., “China Telecom”).
peer_longitude: f64Source longitude.
peer_latitude: f64Source latitude.
server_id: StringServer instance ID.
Implementations§
Trait Implementations§
Source§impl Clone for ConnectionEvent
impl Clone for ConnectionEvent
Source§fn clone(&self) -> ConnectionEvent
fn clone(&self) -> ConnectionEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more