How poderosaproject/poderosa works
Project type and purpose
• This is a Windows desktop terminal‐emulator application (“Poderosa”).
• Primary purpose: provide SSH (with agent/X11/port forwarding), SFTP/SCP, Telnet, serial‐port, pipe, X/ZModem transfers, macro scripting, plugin extensibility, benchmarking.
High‐level architectural overview
• Layered, modular desktop application with a plugin/extension‐point framework.
• Core layers (UI, Core services, TerminalEmulator engine, Protocols engines) link together.
• Extension points let you drop in feature modules (SFTP, PortForward, Serial, XZModem, Macro, etc.).
Main components
A. UI Layer
• Executable/Executable.csproj: application entry‐point, bootstraps UI.
B. Core Services
• Core/Core.csproj: application shell, command/ menu management, plugin loader (ExtensionPointList, PluginList), session/view management, serialization, preferences, macro engine host.
• Plugin/Plugin.csproj: low‐level extension‐point definitions, versioning, remoting, startup.
C. Terminal Emulation Engine
D. Protocol Implementations
• Protocols/Protocols.csproj and Granados/Granados.csproj: SSH1/SSH2 (Cryptography, key‐formats, agent, forwarding, port‐forwarding), Telnet, Cygwin bridge, SOCKS; Granados is SSH library (blowfish, RSA, DH…).
E. Session Management
• TerminalSession/TerminalSession.csproj: UI tab pages, session lifecycle, login dialogs (SSH, Telnet, Cygwin), copy/paste, macros, storage per window.
F. Feature Plugins
• SFTP/SFTP.csproj, SerialPort/SerialPort.csproj, Pipe/Pipe.csproj, XZModem/XZModem.csproj, Macro/Macro.csproj, PortForwarding/PortForwarding.csproj, ContributedPlugins.
• Each plugin implements ITerminalPlugin or IExtensionPoint, provides dialogs, settings serialization, integrates into Core services.
G. Benchmark & Test Suites
• Benchmark, CoreTest, GranadosTest, ProtocolsTest, TerminalEmulatorTest: performance tests, unit tests.
H. Build & Documentation
• build/ scripts, howtobuild.txt; Doc/ for API docs and user/developer manuals.
Relationships & data flows
• [Executable] → initializes → [Core Services]
• [Core Services] ↔ loads ↔ [Plugin Framework]
• [Core Services] ↔ hosts ↔ [UI Layer]
• [UI Layer] ↔ commands/events ↔ [Core Services]
• [Core Services] ↔ instantiates ↔ [TerminalSession Manager]
• [TerminalSession] ↔ uses ↔ [TerminalEmulator Engine]
• [TerminalEmulator Engine] ↔ uses ↔ [Protocols Layer]
• [Protocols Layer] (Granados for SSH) ↔ communicates ↔ external network/serial ports/pipes
• Plugins hook into Core → add new Protocols or UI panels.
• Macro engine invoked by Core services on TerminalSession I/O.
Architectural patterns & principles
• Layered architecture: separation of concerns among UI, core, emulation, protocols.
• Plugin/Extension‐point pattern: Core exposes points, Plugin projects implement.
• Model–View–Controller-ish: Core serves as controller, UI as view, session/emulator as model.
• Dependency inversion: high‐level Core depends on abstraction (IProtocol, IPlugin).
• Event‐driven: UI and TerminalEmulator communicate via events and commands.