Skip to content

TUI Guide

The OpenShield-XDP terminal dashboard provides real-time visibility into your firewall state across 7 interactive screens. Built on Bubbletea, ntcharts, and lipgloss.

Launching

bash
# Option 1: Load and view TUI in one command
sudo openshield load

# Option 2: Daemon + standalone TUI viewer
sudo openshield load --stats-off
sudo openshield tui

# Option 3: Minimal text mode
sudo openshield load --stats-minimal

Screens at a glance

KeyScreenWhat it shows
1DashboardGlobal PPS/BPS, packets passed/dropped, mitigation stats, protocol distribution, drop path breakdown, panic status
2TrafficLive PPS/BPS braille charts, peak/average stats, protocol distribution with bar charts
3AttacksAttack state, type, duration, spike intensity, top offender IPs with scores, attack timeline
4BansPaginated ban table with IP, reason, score, remaining time, star rating, search/filter
5LogsScrolling combined event+system log, search/filter, vi-style navigation, line wrapping
6StatusSystem info (version, kernel, uptime), health badges, map utilization, drop path breakdown
7ConfigLive configuration browser/editor with pending change tracking, validation, and confirmation dialogs
ActionKey(s)
Switch to screen N17
Cycle screens forwardTab
Cycle screens backwardShift+Tab
Click nav tabMouse left-click
Toggle help overlay?
Quitq or Ctrl+C

Screen-specific controls

Logs screen (5)

ActionKey
Scroll down/upj / k or /
Page down/upPgDn / PgUp
Jump to bottomG
Jump to topg
Search/filter/ (type query, Esc to clear, Enter to confirm)
Toggle wrap modew
Mouse scrollScroll wheel

Bans screen (4)

ActionKey
Next/previous pagen / p
Search by IP or reason/ (type query, Esc to clear)
Mouse scrollScroll wheel

Attacks screen (3)

ActionKey
Next/previous page of offendersn / p

Config screen (7) — Live editor

ModeActionKey
BrowseNavigate fields / or j / k or Tab
BrowseEdit selected fieldEnter (runtime-safe fields only)
BrowseToggle read-only fieldsr
BrowsePreview pending changesa
BrowseDiscard all pending changesd
BrowseRevert individual fieldx
EditSave valueEnter
EditCancelEsc
EditBackspaceBackspace
ConfirmApply changesy
ConfirmCanceln or Esc

Config editor workflow

Charts & visualization

Braille resolution graphs

PPS and BPS are rendered as streamline charts using ntcharts with braille-dot resolution (8× higher than ASCII). The Y-axis auto-scales with 10% headroom above the rolling max (~60 data points). The X-axis scrolls left over time, showing recent traffic patterns.

Gradient status bar

The top status bar uses a 10-color gradient (green → yellow → red) based on attack intensity:

  • Green: Normal operation, all clear
  • Yellow: Elevated traffic, approaching thresholds
  • Red: Under attack, spike factor displayed

Drop paths

The drop path breakdown (shown on Dashboard and Status screens) displays where packets are being dropped:

  • Banned — matched existing ban entry
  • RateDrop — exceeded per-IP rate threshold
  • PanicDrop — panic circuit breaker engaged (bulk drop)
  • DNS Amp — DNS amplification detected
  • BogusTCP/L7 Drop/PrivSrc/Malform — validation filters

Reconnection behavior

The TUI connects to the loader's Unix socket at /var/run/openshield/telemetry.sock. If the connection drops (loader crash, socket removed):

  1. Display shows "Connecting to OpenShield-XDP..."
  2. Automatically retries every 3 seconds
  3. Full dashboard resumes when the loader comes back

This works whether you launched via openshield tui (standalone) or openshield load (embedded).

Mouse support

ActionGesture
Switch screenClick nav tab in the navigation bar
Scroll logsScroll wheel on logs screen
Scroll bansScroll wheel on bans screen

Environment

The TUI uses the alternate screen buffer (tea.WithAltScreen()) — your terminal scrollback is preserved when you quit. Terminal dimensions are auto-detected and layout adjusts: wide terminals get side-by-side panels, narrow terminals stack vertically.

CLI variants

bash
openshield load                  # Full TUI (embedded in loader)
openshield load --stats-off      # Daemon mode (no display)
openshield load --stats-minimal  # Text snapshots printed to stdout
openshield tui                   # Standalone viewer (connects to running loader)
openshield stats                 # Alias for 'tui'

Next steps

Configuration · CLI Reference · TUI Screens Deep-Dive