How iamdroppy/ztunnel-ssh works
ZTunnel is an SSH TCP port-forward manager, presented as a Blazor web app and a .NET MAUI app. The main workflow is to save SSH credentials, configure and enable local or remote forwards, then let the background service maintain the SSH session and report tunnel status. The README documents the product behavior; sampled service code confirms connection monitoring, reconnects, and live forward management. The MAUI pages and config-store implementation were not sampled, so their detailed interactions are not expanded here.
Main entry points: Pages Web pages · SshTunnelService.cs Web tunnel service · TunnelConfigStore.cs Config store · Program.cs Web host
Components 17
Web experience
- Web host
ZTunnel/Program.cs - Web pages
ZTunnel/Components/Pages - Tunnel dashboard
ZTunnel/Components/Pages/Home.razor - SSH credentials
ZTunnel/Components/Pages/HostDetail.razor - Forward editor
ZTunnel/Components/Pages/ForwardEdit.razor - Server setup guide
ZTunnel/Components/Pages/Setup.razor
MAUI experience
- MAUI bootstrap
ZTunnel.MAUI/MauiProgram.cs - MAUI shell
ZTunnel.MAUI/MainPage.xaml.cs - MAUI pages
ZTunnel.MAUI/Components/Pages
Tunnel runtime
- Web tunnel service
ZTunnel/Services/SshTunnelService.cs - MAUI tunnel service
ZTunnel.MAUI/Services/SshTunnelService.cs
Configuration domain
- SSH host model
ZTunnel/Models/SshHost.cs - Forward model
ZTunnel/Models/PortForward.cs - Config store
ZTunnel/Services/TunnelConfigStore.cs - Persistent config
Other components
- Operator
- SSH server
Connections 21
- Operator → Web pages: uses
README.md - Web host → Web pages: routes
ZTunnel/Program.cs - Web pages → Tunnel dashboard: includes
README.md - Web pages → SSH credentials: includes
README.md - Web pages → Forward editor: includes
README.md - Web pages → Server setup guide: includes
README.md - SSH credentials → Config store: saves settings
README.md - Forward editor → Config store: updates forwards
README.md - Tunnel dashboard → Web tunnel service: reads status
README.md - SSH credentials → Web tunnel service: requests reconnect
README.md - Forward editor → Web tunnel service: manages live forwards
README.md - Web host → Web tunnel service: hosts service
ZTunnel/Program.cs - Web host → Config store: registers store
ZTunnel/Program.cs - Web tunnel service → Config store: reads configuration
ZTunnel/Services/SshTunnelService.cs - Config store → Persistent config: reads and writes
README.md - Web tunnel service → SSH server: connects and forwards
ZTunnel/Services/SshTunnelService.cs - Operator → MAUI pages: uses
README.md - MAUI bootstrap → MAUI shell: starts app
- MAUI pages → MAUI tunnel service: manages tunnels
README.md - MAUI bootstrap → MAUI tunnel service: registers service
ZTunnel.MAUI/MauiProgram.cs - MAUI tunnel service → SSH server: connects and forwards
ZTunnel.MAUI/Services/SshTunnelService.cs