How jumpserver/koko works
KoKo is JumpServer’s secure connector for interactive access to SSH, Telnet, WinRM, Kubernetes, SFTP, and database assets, with web terminal and file-management capabilities. A principal workflow is a user authenticating and selecting an asset, then entering a protocol-aware session that connects to the target and carries terminal or file activity. WebSocket and Guacamole paths support web sessions, while a separate authenticated web proxy carries HTTP and CONNECT traffic. The graph emphasizes documented and indexed relationships; unsampled subsystems are represented only where the README establishes the capability, without asserting internal wiring.
Main entry points: server.go Protocol proxy · user_auth.go User authentication · connmanager.go Target connections · select_handler.go Asset selection
Components 24
Access and authentication
- User authentication
pkg/auth/user_auth.go - Asset selection
pkg/handler/select_handler.go - Direct access handler
pkg/handler/direct_handler.go - SSH listener
pkg/sshd/server.go
Session transport
- Session exchange
pkg/exchange/redis.go - Session registry
pkg/session/manager.go - Guacamole sessions
pkg/lion/session/server.go - Guacamole tunnel
pkg/lion/tunnel/server.go
Target connections
- Protocol proxy
pkg/proxy/server.go - Database proxy
pkg/proxy/server_database.go - Target connections
pkg/srvconn/connmanager.go - SSH client pool
pkg/srvconn/sshclients.go
Web experiences
- HTTP router
pkg/httpd/webrouter.go - Web session client
pkg/httpd/client.go - Terminal tools
pkg/httpd/terminal_sessiontools.go - HTTP web proxy
pkg/webproxy/server.go
Session operations
- Background tasks
pkg/koko/task.go - WinRM AI tools
internal/sessiontools/protocol.go - ZMODEM transfer
pkg/zmodem/zsession.go
Other components
- JumpServer user
- Managed asset
- JumpServer Core
- Redis
- Web client
Connections 28
- JumpServer user → User authentication: authenticates
pkg/auth/user_auth.go - JumpServer user → Asset selection: selects asset
- Asset selection → Target connections: loads assets
pkg/handler/select_handler.go - Asset selection → Protocol proxy: starts access
- SSH listener → Direct access handler: dispatches sessions
pkg/sshd/server.go - Direct access handler → Protocol proxy: creates proxy
pkg/handler/direct_handler.go - Direct access handler → Target connections: sets connection options
pkg/handler/direct_handler.go - Protocol proxy → Target connections: opens target connection
pkg/proxy/server.go - Protocol proxy → Database proxy: delegates database
pkg/proxy/server.go - Protocol proxy → SSH client pool: reuses SSH client
pkg/proxy/server.go - Managed asset → Target connections: serves protocol
- HTTP router → User authentication: authenticates requests
pkg/httpd/webrouter.go - HTTP router → Web session client: routes terminal WebSocket
- Web session client → Session exchange: exchanges messages
pkg/httpd/client.go - Web session client → Terminal tools: uses session tools
pkg/httpd/terminal_sessiontools.go - Terminal tools → Protocol proxy: invokes session proxy
pkg/httpd/terminal_sessiontools.go - Session exchange → Redis: stores exchange state
pkg/exchange/redis.go - Background tasks → Protocol proxy: uses proxy
pkg/koko/task.go - Background tasks → Guacamole sessions: uses session service
pkg/koko/task.go - Guacamole sessions → Guacamole tunnel: serves tunneled sessions
pkg/lion/tunnel/server.go - Guacamole tunnel → User authentication: joins share room
pkg/lion/tunnel/server.go - Guacamole tunnel → Protocol proxy: records file activity
pkg/lion/tunnel/server.go - Web client → HTTP web proxy: sends HTTP or CONNECT
pkg/webproxy/server.go - HTTP web proxy → Managed asset: forwards traffic
pkg/webproxy/server.go - Protocol proxy → WinRM AI tools: exposes AI commands
- Protocol proxy → ZMODEM transfer: supports file transfer
pkg/proxy/server.go - JumpServer Core → User authentication: provides identity
- JumpServer Core → Guacamole sessions: provides session services