mDNS TUI Browser is a cross-platform terminal-based tool designed to browse and monitor mDNS services in real time. Built with Rust and utilizing ratatui for its user interface, it provides a seamless way to explore and manage network services through an interactive text-based interface.
Key Features:
Interactive Terminal UI: Navigate services using keyboard shortcuts and view detailed information about each service, including IP addresses, ports, and TXT records.
Real-Time Updates: Leverages an asynchronous architecture to display live updates as services are discovered or updated on the network.
Service Details and Metrics: Displays comprehensive metrics for services, including session history and performance data.
Advanced Filtering and Sorting: Filter services by type, name, or status (online/offline/flapping), and sort results based on multiple criteria such as host, port, or address.
Custom Service Discovery: Specify service types via CLI to target hard-to-find services or browse all services automatically.
Audience & Benefit:
Ideal for network administrators, developers, and IT professionals who need a reliable tool to monitor and manage mDNS services. It provides a clear and efficient way to troubleshoot network issues, analyze service behavior, and gain insights into network topology. The toolβs flexibility and real-time capabilities make it an essential utility for anyone working with mDNS in a cross-platform environment.
The software can be installed via winget on Windows, making it easily accessible across different operating systems.
README
mDNS TUI Browser
A terminal-based mDNS service browser built with Rust, using ratatui for the TUI interface. For an alternative running as a desktop app, check out mDNS-Browser.
Features
π₯οΈ Interactive TUI: Full terminal UI with keyboard navigation
π Service Details: Display IP address, port, and TXT records
π Real-time Updates: Async architecture for live service discovery
π Live Metrics: Comprehensive ServiceDaemon and application metrics
ποΈ Service Type Filtering: Browse different service types separately
π Quick Filter: Text-based search across all service fields
π Advanced Sorting: Sort by Host, Type, Name, Port, Address, or Time in both directions
βοΈ Custom Service Discovery: Specify service types via CLI for hard-to-discover services
πΎ JSON State Dump: Export complete application state to JSON with Ctrl+J
You can install mdns-tui-browser from the Arch User Repository (AUR) using yay:
# Install using yay
yay -S mdns-tui-browser
This will install the latest version from the AUR and handle updates automatically with your regular system updates.
Install using Homebrew (macOS)
You can install mdns-tui-browser via Homebrew:
# Tap the repository first
brew tap hrzlgnm/tap
brew install --cask mdns-tui-browser
Or install directly without tapping:
brew install --cask hrzlgnm/tap/mdns-tui-browser
This will install the latest version from the Homebrew tap and handle updates automatically with brew upgrade.
Install using winget on Windows
You can install mdns-tui-browser from Winget Packages using winget:
# Install using winget
winget install hrzlgnm.mdns-tui-browser
This will install the latest version from Winget Packages and handle updates automatically with your regular system updates.
CLI Options
# Show version
mdns-tui-browser --version
mdns-tui-browser -V
# Show help
mdns-tui-browser --help
mdns-tui-browser -h
# Browse explicit service types, instead of auto-discovery
mdns-tui-browser --service-types "_http._tcp.local.,_ssh._tcp.local."
mdns-tui-browser -s "_printer._tcp.local."
# Browse with shortened service types (auto-completed)
mdns-tui-browser -s "_http,_ssh"
mdns-tui-browser -s "http,ssh"
mdns-tui-browser -s http -s ssh
# Use specific network interfaces
mdns-tui-browser -i en0
mdns-tui-browser --interfaces en0,eth0
# Disable IPv4 or IPv6 mDNS discovery
mdns-tui-browser --no-ipv4
mdns-tui-browser --no-ipv6
# Load state from a JSON file (view-only mode, no browsing)
mdns-tui-browser --load-state state-dump.json
mdns-tui-browser -l state-dump.json
Service Types Argument (--service-types/-s)
Service types to browse for (e.g., http, _http._tcp, printer). Auto-completes (_)service, (_)sub, .(_)[tc|ud]p and .local. suffix.
Usage:
Can be specified multiple times
Accepts comma-separated list of mDNS service types
Auto-completes various service type formats automatically
Examples: http, _http._tcp, printer
JSON State Dump
The application can export the complete current state to a JSON file for debugging and analysis purposes, and can also load a previously exported state file for inspection.
Usage
Press Ctrl+J in the TUI to trigger a state dump. The file will be saved with an ISO timestamp filename:
20260207T120102.089898-state-dump.json
To load a previously exported state file for inspection (view-only mode, no browsing):
PageUp/PageDown or b/f or Space - Scroll services list by page
Home/End - Jump to first/last service in list
Enter - Open service URL in browser (_http._tcp or URL from TXT)
s - Cycle sort field forward (Host β Type β Name β Port β Addr β Time)
S - Cycle sort field backward (Time β Addr β Port β Name β Type β Host)
o - Toggle sort direction (β/β)
/ - Enter quick filter mode (search across all service fields)
a - Add new service type to browse
n - Clear current filter
d - Remove offline services
D - Clear stale service types (service types with no services)
m - Show service metrics
Ctrl+J - Dump current state to JSON file
Ctrl+Z - Suspend the application (Unix only)
? - Toggle help popup
Shift+β/β or J/K - Scroll service details
q or Ctrl+c - Quit the application
Service Details Controls
Shift+β/β or J/K - Scroll service details
Help Popup Controls
β/β - Scroll help content
r - Open release notes in browser
Any other key - Close help popup
Quick Filter Mode
When in filter mode (activated with /):
Enter - Apply filter
Esc - Cancel filter input
Backspace - Delete last character
Any other key - Type search text (case-insensitive)
Special Keywords
The quickfilter supports special keywords for filtering by service status:
online - Shows online services AND services containing "online" in any field (fullname, host, service type, TXT records, etc.)
offline - Shows offline services AND services containing "offline" in any field (fullname, host, service type, TXT records, etc.)
flapping - Shows services that are flapping (detected based on session history - at least 3 sessions with at least half shorter than 5 minutes)
Case-insensitive: ONLINE, Online, offline, OFFLINE, FLAPPING, Flapping all work
Hybrid mode: Keywords match both by status AND text content
Combined queries: online http shows online services with "http" in text fields
Examples:
# Press '/' then type:
online # Show online services + services with "online" in text
offline # Show offline services + services with "offline" in text
flapping # Show flapping services
online http # Show online HTTP services
offline printer # Show offline printer services
online flapping # Show services that are both online AND flapping
online offline # Shows all services (both keywords present)
Add Service Type Mode
When in add service type mode (activated with a):
Enter - Add the service type and start browsing
Esc - Cancel input
Backspace - Delete last character
Any other key - Type service type name
The service type is automatically normalized (e.g., http becomes _http._tcp.local.).
Architecture
The application is built with:
Rust - Systems programming language (Safe Rust only - no unsafe blocks allowed)
ratatui - Terminal UI framework
tokio - Async runtime
crossterm - Terminal handling
flume - Async channel library for communication
mdns-sd - mDNS service discovery library
clap - Command line argument parsing library
chrono - Date and time handling for local timestamp display
serde - Serialization framework for JSON export
serde_json - JSON serialization support
if-addrs - Network interface enumeration
nix - Unix system calls (signal handling for Ctrl+Z suspend)
open - Cross-platform library to open URLs in the browser
url - URL parsing and validation for URL extraction from TXT records
Safety Policy
This project follows a Safe Rust Only policy:
No unsafe blocks are permitted in the codebase
All memory safety is guaranteed by Rust's compiler and runtime
The codebase is configured to reject unsafe code
This ensures maximum security and reliability for the mDNS service browser
Features
Extensible Design: Built for real mDNS service discovery
Project Structure
src/
βββ main.rs # Entry point with CLI argument handling
βββ tui_app.rs # Main TUI application logic
βββ input.rs # User input handling (filter, service type)
βββ popup.rs # Popup UI components (help, metrics)
βββ scroll.rs # Scroll state management
βββ models.rs # Data models
βββ terminal.rs # Terminal management
Building
The project uses Cargo for building:
cargo run - Run the TUI application
cargo build --release - Build optimized release version
Build Provenance
Starting from Release 1.6.0, all release assets include cryptographic build provenance attestations generated by GitHub Actions. This provides verifiable evidence that the binaries were built from the official source code repository.
What is Build Provenance?
Build provenance is a cryptographically signed attestation that answers:
Who built the binary (GitHub Actions)
What source code was used (specific commit hash)
How the binary was built (build process and environment)
When the binary was built (timestamp)
Verifying Release Assets
You can verify the authenticity of release assets using the GitHub CLI:
# Using GitHub CLI
gh attestation verify mdns-tui-browser--Linux-x86_64.tar.gz --repo hrlzgnm/mdns-tui-browser
This ensures that the binaries you download are authentic and haven't been tampered with.
Auditable Builds
Starting from Release 1.6.0, all release binaries are built with cargo-auditable, which embeds detailed dependency information directly into the executable. This provides additional security benefits:
What are Auditable Builds?
Auditable builds embed a complete dependency tree in JSON format within the binary, enabling:
Security Auditing: Scan binaries for known vulnerabilities in their dependencies
Supply Chain Transparency: Know exactly which crate versions were used
Zero Bookkeeping: No separate dependency tracking required
Production Safety: Verify that production binaries match expected dependencies
How It Works
The cargo auditable command builds your application with additional metadata:
Embeds JSON-formatted dependency information in a dedicated binary section
Typically adds less than 4KB even to large dependency trees
Works across all platforms (Linux, Windows, macOS, WebAssembly)
Auditing Release Binaries
You can audit any release binary to verify its dependencies:
# Install required tools
cargo install cargo-audit
# Extract and audit dependencies from a release binary
cargo audit bin path/to/mdns-tui-browser
Build Process
Release builds use auditable builds by default:
CI/CD builds: Use cargo auditable build --release
Development builds: Use standard cargo build --release for performance
Dependency tracking: Automatic, no manual intervention required
This ensures that every release binary can be independently verified for security compliance and supply chain integrity.