1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Client and protocol support for iWAN-compatible networks.
//!
//! The crate separates the byte-level protocol from system tunnel management.
//! Applications that already own a TUN device can use [`Client`] and
//! [`PacketDevice`] without invoking any platform commands.
//!
//! # Main APIs
//!
//! - [`Client`] authenticates direct connections and creates a
//! [`ConnectedSession`].
//! - [`PacketDevice`] exchanges IP packets without configuring a system TUN
//! interface.
//! - [`ClientConfig`] configures transport, encryption, reconnection, and
//! Segment Routing.
//! - [`protocol`] contains wire-level packet and TLV types.
//! - `managed` contains controller authentication and connection discovery
//! when the `managed` feature is enabled.
//!
//! # Example
//!
//! ```no_run
//! use openiwan::{Client, ClientConfig, EncryptionMethod, Result};
//!
//! fn connect(password: String) -> Result<()> {
//! let mut config = ClientConfig::new("vpn.example.com:443");
//! config.encryption = EncryptionMethod::Aes;
//!
//! let client = Client::new(config, "alice", password)?;
//! let session = client.authenticate()?;
//! session.close()
//! }
//! ```
//!
//! # Cargo features
//!
//! - `managed` enables controller-managed APIs and the CLI's profile and saved
//! credential workflows.
//! - `forward` enables the CLI's TCP, HTTP, and HTTPS forwarding commands.
//!
//! Both features are enabled by default. Disable them when an application
//! needs only the core client, protocol, DNS, and TUN APIs.
pub use ;
pub use ;
pub use ;
pub use ;
pub use SrEncryptionAlgorithm;