How highskai/lotus works
LOTUS is a Windows desktop app for encrypted DNS and bring-your-own-server VPN sessions. Users choose LOTUS or SHADOW, configure a resolver or server and routing options, then connect; the privileged service validates and runs the session, applying Windows DNS and firewall protections and reporting verified status. The graph also captures the console, leak checks, usage, server import, tray, and updates. Edges reflect README statements and shown source/index references; several UI and service subsystems are documented but not sampled in detail.
Main entry points: App.tsx Desktop shell · controller.rs Session controller · commands.rs Desktop commands · engine.rs sing-box supervisor
Components 34
Desktop experience
- Desktop shell
app/src/App.tsx - Mode controls
app/src/screens/Home.tsx - Server management
app/src/screens/Servers.tsx - Server editor
app/src/screens/ServerEditor.tsx - Connection settings
app/src/screens/Settings.tsx - Live console
app/src/screens/Console.tsx - Privacy checks
app/src/screens/Tools.tsx - Usage history
app/src/screens/Usage.tsx - Update controls
app/src/screens/Updates.tsx - Desktop commands
app/src-tauri/src/commands.rs - System tray
app/src-tauri/src/tray.rs - App settings store
app/src-tauri/src/store.rs - Service client
app/src-tauri/src/service_client.rs
Profiles and configuration
- Profile model
crates/lotus-core/src/model.rs - Profile import
crates/lotus-core/src/import.rs - Security validation
crates/lotus-core/src/validate.rs - Engine config
crates/lotus-core/src/singbox.rs
Session service
- Service entry
crates/lotus-service/src/main.rs - Service IPC
crates/lotus-service/src/ipc_server.rs - Session controller
crates/lotus-service/src/controller.rs - Session lifecycle
crates/lotus-service/src/session.rs - sing-box supervisor
crates/lotus-service/src/engine.rs - Connectivity probes
crates/lotus-service/src/probe.rs - Diagnostics
crates/lotus-service/src/diagnostics.rs - Server verification
crates/lotus-service/src/verify.rs - Session state store
crates/lotus-service/src/state.rs - Usage accounting
crates/lotus-service/src/usage.rs
Windows protection
- DNS adapters
crates/lotus-service/src/win/adapters.rs - Firewall guards
crates/lotus-service/src/win/wfp.rs - Engine job control
crates/lotus-service/src/win/job.rs
Other components
- User
- User-owned server
- Encrypted resolver
- Internet
Connections 37
- User → Desktop shell: uses
README.md - Desktop shell → Mode controls: shows
app/src/App.tsx - Desktop shell → Server management: shows
app/src/App.tsx - Desktop shell → Server editor: shows
app/src/App.tsx - Desktop shell → Connection settings: shows
app/src/App.tsx - Desktop shell → Live console: shows
app/src/App.tsx - Desktop shell → Privacy checks: shows
app/src/App.tsx - Desktop shell → Usage history: shows
app/src/App.tsx - Desktop shell → Update controls: shows
app/src/App.tsx - Mode controls → Desktop commands: invokes
- Server management → Desktop commands: manages profiles
- Server editor → Desktop commands: imports profiles
- Connection settings → Desktop commands: saves options
- Desktop commands → Service client: requests service
app/src-tauri/src/commands.rs - Desktop commands → App settings store: persists settings
app/src-tauri/src/commands.rs - System tray → Desktop commands: dispatches actions
app/src-tauri/src/tray.rs - Service client → Service IPC: exchanges messages
README.md - Profile model → Security validation: validates
crates/lotus-core/src/validate.rs - Profile import → Profile model: parses into
crates/lotus-core/src/import.rs - Engine config → Profile model: generates from
crates/lotus-core/src/singbox.rs - Service entry → Session controller: starts
crates/lotus-service/src/main.rs - Service entry → Service IPC: starts
crates/lotus-service/src/main.rs - Service IPC → Session controller: dispatches commands
- Session controller → Session lifecycle: starts sessions
crates/lotus-service/src/controller.rs - Session controller → sing-box supervisor: supervises
crates/lotus-service/src/controller.rs - Session controller → Session state store: stores session state
crates/lotus-service/src/controller.rs - Session controller → DNS adapters: sets DNS
crates/lotus-service/src/controller.rs - Session controller → Firewall guards: configures guards
crates/lotus-service/src/controller.rs - Session lifecycle → sing-box supervisor: runs engine
crates/lotus-service/src/session.rs - Session lifecycle → Connectivity probes: checks data path
crates/lotus-service/src/session.rs - sing-box supervisor → Engine job control: controls process
crates/lotus-service/src/engine.rs - Usage accounting → Session controller: reads session totals
crates/lotus-service/src/usage.rs - Diagnostics → Service entry: provides diagnostics
crates/lotus-service/src/main.rs - Server verification → Connectivity probes: checks server
- sing-box supervisor → Encrypted resolver: sends encrypted DNS
README.md - sing-box supervisor → User-owned server: tunnels traffic
README.md - User-owned server → Internet: forwards traffic
README.md