Skip to main content

openvpn_mgmt_codec/
kill_target.rs

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