How thetorproject/stegotorus works
Project’s Main Components
• Chopper Protocol: This is at the heart of the system. It splits the network traffic into small chunks, manages retransmission (if needed), and encrypts data using OpenSSL.
• Steg Modules: These components (e.g., NoSteg and various HTTP steg flavors) take the chopped, encrypted data and encode it into “cover” formats that blend in with benign traffic. They should be represented as independent modules that plug into the chopper mechanism.
• Network Communication Components: This includes code managing TCP/IP-like connections (see files like connections.cc, network.cc, transparent_proxy.cc) and handling client/server interactions.
• Configuration & Deployment: The conf.d directory (and related test config files) indicate how different operational profiles (such as HTTP Apache client/server or test configurations) are set up and used by the system.
• External Dependencies: Incorporate dependencies like libevent (for event handling), libcurl (for HTTP connectivity), yaml-cpp (for configuration handling), boost libraries (for file system and system functions), libssl (OpenSSL for encryption), and zlib (for compression).
Establish the Relationships and Interactions
• From there, illustrate how the connection data proceeds to the chopper protocol. Mark this layer as performing encryption, data chunking, and retransmission logic.
• Next, split out the flow into one or more steg modules. Indicate that the chopper protocol “plugs” data off to a chosen steg module based on configuration (with options like NoSteg, HTTP with various encoding strategies, etc.).
• Feedback path where the steg module may interact with external cover media (like an HTTP payload or file-based cover for Apache) that ‘hides’ the traffic.
Architectural Patterns and Design Principles
• Separation of Concerns: Clearly delineate the network and protocol management responsibilities (handled by the chopper and network classes) versus the encoding/decoding responsibilities (handled by distinct steg module classes).
Incorporate Relevant Technologies
• External library with its role (e.g., “OpenSSL for encryption”, “libevent for asynchronous operations”, “curl for HTTP functionalities”).
• For build and deployment, indicate that the system uses GNU Autotools (autoconf/automake), with platform-specific build scripts under scripts (e.g., build-linux.sh, build-android.sh, build-windows.sh).
• From that, create a block for the network/connection handling layer that interfaces with system calls or socket libraries.
• Next, position the chopper protocol component, indicating its roles (chunking, encryption, retransmission).
• An additional block to represent external “cover” services such as an HTTP server with which steg modules interact.
• Optionally, include notes regarding platform choices like Linux, Windows, and Android, as illustrated through the dedicated build scripts.
Additional Details
• Auxiliary components such as testing and configuration modules in a separate area or as annotations if needed.