How vnt-dev/vnt works
Project Overview & Main Components
• VNT is a VPN tool that creates a virtual LAN using virtual IPs, NAT traversal, and multiple encryption/compression strategies. Its key purpose is to provide a secure and efficient way to connect devices across different networks.
• The project is structured as a multi-crate workspace with several distinct components:
• vnt-cli & vnt-cli/README.md: The command‐line interface for interacting with the VPN. It handles parameter parsing and user commands (like “info” and “list”).
• vnt: The core VPN library/application that implements the networking, encryption, packet handling, NAT traversal, and protocol logic.
• vn-link and vn-link-cli: These likely serve as additional linking modules or configuration helpers for network mapping (for TCP/UDP protocols).
• common: A shared library containing common utilities – CLI argument parsing, command processing, configuration, console output, etc.
• Other directories (like documents and proto) provide supporting assets such as images for documentation and protocol definitions (e.g., protocol buffers in message.proto).
Analyzing the File Structure for Architectural Clues
• Multiple sub-crates (each with its own Cargo.toml) point to a modular design where different functionalities are separated into distinct libraries:
• The separation of “in_mapping” and “out_mapping” in vn-link clearly suggests handling of incoming and outgoing network data transformations over TCP/UDP connections.
• The structure clearly reflects a layered design: a CLI frontend that uses common utilities and then calls into the core VNT library, which in turn orchestrates packet handling, encryption/decryption, network channel management, and protocol processing.
Final Steps
• Detailed labeling of each identified module.
• Differentiation between internal modules and external dependencies (e.g., TUN/TAP interfaces, relay servers).