pub enum Notification {
Show 21 variants
Client {
event: ClientEvent,
cid: u64,
kid: Option<u64>,
env: BTreeMap<String, String>,
},
ClientAddress {
cid: u64,
addr: String,
primary: bool,
},
State {
timestamp: u64,
name: OpenVpnState,
description: String,
local_ip: String,
remote_ip: String,
remote_port: Option<u16>,
local_addr: String,
local_port: Option<u16>,
local_ipv6: String,
},
ByteCount {
bytes_in: u64,
bytes_out: u64,
},
ByteCountCli {
cid: u64,
bytes_in: u64,
bytes_out: u64,
},
Log {
timestamp: u64,
level: LogLevel,
message: String,
},
Echo {
timestamp: u64,
param: String,
},
Hold {
text: String,
},
Fatal {
message: String,
},
Pkcs11IdCount {
count: u32,
},
NeedOk {
name: String,
message: String,
},
NeedStr {
name: String,
message: String,
},
RsaSign {
data: String,
},
PkSign {
data: String,
algorithm: Option<String>,
},
InfoMsg {
extra: String,
},
NeedCertificate {
hint: String,
},
Info {
message: String,
},
Remote {
host: String,
port: u16,
protocol: TransportProtocol,
},
Proxy {
index: u32,
proxy_type: TransportProtocol,
host: String,
},
Password(PasswordNotification),
Simple {
kind: String,
payload: String,
},
}Expand description
Variants§
Client
A multi-line >CLIENT: notification (CONNECT, REAUTH, ESTABLISHED,
DISCONNECT). The header and all ENV key=value pairs are accumulated
into a single struct before this is emitted.
Fields
event: ClientEventThe client event sub-type.
ClientAddress
A single-line >CLIENT:ADDRESS notification.
Fields
State
>STATE:timestamp,name,desc,local_ip,remote_ip,remote_port,local_addr,local_port,local_ipv6
Field order per management-notes.txt: (a) timestamp, (b) state name, (c) description, (d) TUN/TAP local IPv4, (e) remote server address, (f) remote server port, (g) local address, (h) local port, (i) TUN/TAP local IPv6.
Fields
name: OpenVpnState(b) State name (e.g. Connected, Reconnecting).
ByteCount
>BYTECOUNT:bytes_in,bytes_out (client mode)
ByteCountCli
>BYTECOUNT_CLI:cid,bytes_in,bytes_out (server mode, per-client)
Fields
Log
>LOG:timestamp,level,message
Fields
Echo
>ECHO:timestamp,param_string
Hold
>HOLD:Waiting for hold release[:N]
Fatal
>FATAL:message
Pkcs11IdCount
>PKCS11ID-COUNT:count
NeedOk
>NEED-OK:Need 'name' confirmation MSG:message
NeedStr
>NEED-STR:Need 'name' input MSG:message
RsaSign
>RSA_SIGN:base64_data
PkSign
>PK_SIGN:base64_data[,algorithm]
Sent by OpenVPN 2.5+ when --management-external-key is active and
a signature is needed. The management client responds with
PkSig.
The algorithm field is present only when the management client
announced version > 2 via the version command. For RSA-PSS, the
algorithm includes comma-separated params:
RSA_PKCS1_PSS_PADDING,hashalg=SHA256,saltlen=max.
Source: management-notes.txt,
ssl_openssl.c get_sig_from_man().
Fields
InfoMsg
>INFOMSG:extra
Authentication-related information from the server, such as
CR_TEXT challenges, OPEN_URL, or WEB_AUTH SSO directives.
Delivered to the client via client-pending-auth.
Source: management-notes.txt
(see “client-pending-auth” section).
Fields
NeedCertificate
>NEED-CERTIFICATE:hint
Requests an external certificate when --management-external-cert
is active. The hint identifies which certificate to provide
(e.g. macosx-keychain:subject:o=OpenVPN-TEST). The management
client responds with Certificate.
Info
>INFO:message
Informational notification sent at any time (not just the initial banner).
Notable sub-types include >INFO:WEB_AUTH::url for web-based authentication.
The initial >INFO: banner on connect is still surfaced as
OvpnMessage::Info (before the codec enters notification mode).
This variant captures all subsequent >INFO: messages.
Remote
>REMOTE:host,port,protocol
Fields
protocol: TransportProtocolTransport protocol.
Proxy
>PROXY:index,proxy_type,host
Sent when OpenVPN needs proxy information (requires
--management-query-proxy). The management client responds
with a proxy command.
Fields
proxy_type: TransportProtocolProxy type (e.g. TCP, UDP).
Password(PasswordNotification)
>PASSWORD:... — see PasswordNotification for the sub-types.
Simple
Fallback for any notification type not explicitly modeled above. Kept for forward compatibility with future OpenVPN versions.
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more