Skip to main content

openvpn_mgmt_codec/
lib.rs

1#![doc = include_str!("../README.md")]
2#![deny(unsafe_code)]
3#![warn(missing_docs)]
4
5/// Authentication credential types and retry strategies.
6pub mod auth;
7/// High-level management client with notification dispatch.
8pub mod client;
9/// Typed client-deny command with builder support.
10pub mod client_deny;
11/// Client notification event types (CONNECT, REAUTH, etc.).
12pub mod client_event;
13/// The [`OvpnCodec`] encoder/decoder implementation.
14pub mod codec;
15/// Typed management-interface commands ([`OvpnCommand`]).
16pub mod command;
17/// Builder for outgoing CRV1 dynamic-challenge strings.
18pub mod crv1_challenge;
19/// Client kill-target addressing.
20pub mod kill_target;
21/// Log severity levels (Info, Debug, Warning, etc.).
22pub mod log_level;
23/// Decoded messages and real-time notifications.
24pub mod message;
25/// Responses to `>NEED-OK:` prompts.
26pub mod need_ok;
27/// OpenVPN connection states (CONNECTING, CONNECTED, etc.).
28pub mod openvpn_state;
29/// Typed parsers for `SUCCESS:` payloads and multi-line responses.
30pub mod parsed_response;
31/// Proxy configuration for `>PROXY:` responses.
32pub mod proxy_action;
33/// A wrapper type that masks sensitive values in debug/display output.
34pub mod redacted;
35/// Remote-override actions for `>REMOTE:` responses.
36pub mod remote_action;
37/// Daemon signals (HUP, TERM, USR1, USR2).
38pub mod signal;
39/// Typed parsers for `status` command responses (client table, routing, stats).
40pub mod status;
41/// Status output format versions (V1/V2/V3).
42pub mod status_format;
43/// Stream adapter categorizing messages as responses or notifications.
44pub mod stream;
45/// Stream mode selectors (on/off/all/recent).
46pub mod stream_mode;
47/// Lightweight UTC timestamp formatting.
48pub mod timestamp;
49/// Transport protocol (UDP, TCP) for remote/proxy notifications.
50pub mod transport_protocol;
51/// Error classification for unrecognized protocol lines.
52pub mod unrecognized;
53/// Parsed version information from the `version` command.
54pub mod version_info;
55
56pub use auth::{AuthRetryMode, AuthType, ParseAuthRetryModeError, ParseAuthTypeError};
57pub use client_deny::ClientDeny;
58pub use client_event::{ClientEvent, ParseClientEventError};
59pub use codec::{AccumulationLimit, EncodeError, EncoderMode, OvpnCodec};
60pub use command::{CommandParseError, OvpnCommand, RemoteEntryRange};
61pub use crv1_challenge::Crv1Challenge;
62pub use kill_target::KillTarget;
63pub use log_level::{LogLevel, ParseLogLevelError};
64pub use message::{Notification, OvpnMessage, PasswordNotification};
65pub use need_ok::NeedOkResponse;
66pub use openvpn_state::{OpenVpnState, ParseOpenVpnStateError};
67pub use proxy_action::ProxyAction;
68pub use redacted::Redacted;
69pub use remote_action::RemoteAction;
70pub use signal::{ParseSignalError, Signal};
71pub use status_format::{ParseStatusFormatError, StatusFormat};
72pub use stream_mode::{ParseStreamModeError, StreamMode};
73pub use transport_protocol::{ParseTransportProtocolError, TransportProtocol};
74pub use unrecognized::UnrecognizedKind;
75pub use version_info::VersionInfo;
76
77// Re-export key items from sub-modules for convenience.
78pub use client::{ClientError, ManagementClient};
79pub use command::{connection_sequence, server_connection_sequence};
80pub use parsed_response::{LoadStats, ParseResponseError, StateEntry};
81pub use status::{
82    ClientStatistics, ConnectedClient, ParseStatusError, RoutingEntry, StatusResponse,
83    parse_client_statistics, parse_status,
84};
85pub use stream::{ClassifyExt, ManagementEvent};