openvpn_mgmt_codec/kill_target.rs
1use crate::transport_protocol::TransportProtocol;
2
3/// How to identify a client to kill (server mode).
4#[derive(Debug, Clone, PartialEq, Eq)]
5pub enum KillTarget {
6 /// Kill by Common Name from the client's TLS certificate.
7 CommonName(String),
8
9 /// Kill by exact `protocol:IP:port` of the client's real address.
10 /// Wire: `kill tcp:1.2.3.4:4000`
11 Address {
12 /// Transport protocol (`tcp` or `udp`).
13 protocol: TransportProtocol,
14 /// Client IP address.
15 ip: String,
16 /// Client source port.
17 port: u16,
18 },
19}