How goshs-labs/goshs works
goshs is a single-binary engagement file server and collaboration toolkit. The main workflow parses options, validates configuration, starts selected listeners, and serves files or captures protocol callbacks; operators can observe events in the web UI or TUI. The graph preserves the README’s major protocol, security, sharing, templating, and collaboration capabilities. Some implementation details—especially unsampled protocol handlers and integrations—are represented only where documented, or left unverified rather than inferred as direct calls.
Main entry points: server/server.go Service orchestration · httpserver/server.go HTTP / WebDAV · hub.go Event hub · chat.go Team chat
Components 23
Startup and configuration
- CLI options
options/options.go - Config loading
config/config.go - Option validation
sanity/checks.go - Service orchestration
server/server.go
File serving
- HTTP / WebDAV
httpserver/server.go - File operations
httpserver/handler.go - Share links
httpserver/handler.go - Payload templating
httpserver/template.go
Protocol services
- FTP
ftpserver/ftpserver.go - SFTP
sftpserver/sftpserver.go - SMB and NTLM
smbserver/server.go - LDAP capture
ldapserver/session.go - DNS callbacks
dnsserver/server.go - SMTP capture
smtpserver/session.go
Collaboration and events
- Team chat
chat/chat.go - Event hub
ws/hub.go - WebSocket clients
ws/client.go - Terminal dashboard
tui/tui.go - Reverse-shell catcher
catcher/catcher.go
Security and integrations
- Webhook delivery
webhook/webhook.go - TLS certificates
ca/ca.go - Public tunnel
tunnel/tunnel.go
Other components
- Operator
Connections 33
- Operator → CLI options: sets flags
options/options.go - Operator → HTTP / WebDAV: uses server
- CLI options → Config loading: loads settings
- CLI options → Option validation: validates options
- Option validation → Service orchestration: starts runtime
- Service orchestration → HTTP / WebDAV: starts listener
server/server.go - Service orchestration → FTP: starts when enabled
server/server.go - Service orchestration → SFTP: starts when enabled
server/server.go - Service orchestration → SMB and NTLM: starts when enabled
server/server.go - Service orchestration → LDAP capture: starts when enabled
server/server.go - Service orchestration → DNS callbacks: starts when enabled
server/server.go - Service orchestration → SMTP capture: starts when enabled
server/server.go - HTTP / WebDAV → File operations: routes requests
- HTTP / WebDAV → Share links: routes share requests
httpserver/server.go - HTTP / WebDAV → Payload templating: serves rendered files
- HTTP / WebDAV → TLS certificates: configures TLS
httpserver/server.go - Service orchestration → Team chat: creates shared chat
server/server.go - Service orchestration → Event hub: creates event hub
server/server.go - HTTP / WebDAV → Team chat: receives shared chat
httpserver/server.go - HTTP / WebDAV → Event hub: uses event hub
httpserver/server.go - Event hub → Team chat: stores chat reference
ws/hub.go - WebSocket clients → Team chat: updates messages
ws/client.go - WebSocket clients → Event hub: broadcasts events
ws/client.go - Service orchestration → Terminal dashboard: launches dashboard
- Terminal dashboard → Event hub: observes events
tui/tui.go - Terminal dashboard → Team chat: shares chat state
tui/tui.go - Service orchestration → Reverse-shell catcher: exposes catcher
server/server.go - SMB and NTLM → Event hub: broadcasts captures
- LDAP capture → Event hub: broadcasts captures
- DNS callbacks → Event hub: broadcasts queries
dnsserver/server.go - SMTP capture → Event hub: reports mail events
- DNS callbacks → Webhook delivery: sends callbacks
dnsserver/server.go - Service orchestration → Public tunnel: starts optional tunnel