Expand description
OpenVPN Protocol Implementation
Implements the OpenVPN control and data channel protocols, including:
- Packet opcodes and header parsing (P_CONTROL, P_DATA, P_ACK)
- TLS-Auth pre-shared HMAC authentication
- Client state machine (Initial -> TLS -> Auth -> Connected)
- Packet ID anti-replay protection (sliding window)
- Configuration file parsing (key=value format)
Structs§
- Openvpn
Client - OpenVPN client connection
- Openvpn
Config - OpenVPN client/server configuration
- Openvpn
Header - Parsed OpenVPN packet header
- Packet
IdWindow - Sliding-window anti-replay protection for packet IDs
- TlsAuth
- TLS-Auth pre-shared HMAC key for control channel authentication
Enums§
- Auth
Algorithm - HMAC authentication algorithm (for non-AEAD ciphers)
- Cipher
Algorithm - Data channel cipher algorithm
- Compression
- Compression algorithm
- Openvpn
Error - OpenVPN protocol error
- Openvpn
Opcode - OpenVPN packet opcodes (5 bits, high nibble of first byte)
- Openvpn
State - Client connection state
- Transport
Proto - Transport protocol for the tunnel
Constants§
- DEFAULT_
PORT - Default OpenVPN UDP port
Functions§
- parse_
config - Parse an OpenVPN-style configuration from key=value lines.