A cross-platform network sniffing dashboard with a terminal UI similar to btop. NSD allows users to view network statistics and drill down into individual connections.
Check out the docs/ui_preview.txt file for a preview of the terminal UI, including the network traffic visualization graphs.
- Real-time network traffic statistics
- Visual graphs for network traffic ingress and egress
- Static gradient shading for graph fills (toggleable via
--gradientflag) - Custom theme loading from JSON/YAML via
--theme-fileflag - Detailed connection information (source, destination, protocol, etc.)
- Interactive terminal UI with btop-like look and feel
- Promiscuous mode for capturing all network traffic
- Extensive cross-platform support:
- Linux: amd64, 386, arm64, armv7, armv6 (Raspberry Pi), mips/mipsle, ppc64le, s390x
- macOS: Intel and Apple Silicon
- Windows: amd64, 386, arm64
- BSD: FreeBSD, OpenBSD, NetBSD, DragonFlyBSD
- Go 1.24 or higher
- libpcap development files (for packet capture)
- On Ubuntu/Debian:
sudo apt-get install libpcap-dev - On macOS: Included with the OS or install via Homebrew:
brew install libpcap - On Windows: Install Npcap (see Windows Installation Guide)
- For other platforms: See Platform-Specific Installation Guide
- On Ubuntu/Debian:
# Clone the repository
git clone https://github.com/perplext/nsd.git
cd nsd
# Build the application
go build -o nsd ./cmd/nsd
# Or use make
make build
# Build for all platforms
make build-all
# Run the application (requires root/administrator privileges)
sudo ./bin/nsd# Basic usage
sudo nsd
# Specify a network interface
sudo ./nsd -i eth0
# Specify a theme
sudo ./nsd -theme "High-Contrast Dark"
# Disable static gradient shading
sudo ./nsd -gradient=false
# Load custom theme
sudo ./nsd --theme-file /path/to/custom_theme.json
# Help information
./nsd -hNSD can load Go-based plugins at runtime using the --plugins flag. Plugins must be compiled as Go plugins (.so) with:
cd examples/simpleplugin
go build -buildmode=plugin -o simpleplugin.so simpleplugin.goThen start NSD with your plugin:
sudo ./nsd --plugins examples/simpleplugin/simpleplugin.soThe provided SimplePlugin logs the packet buffer length every 10 seconds.
NSD supports live protocol-level filtering and usage charting:
- Press
bto set a BPF filter (e.g.tcp and port 80) during capture. - Press
pto view and auto-refresh the raw packet buffer. - The protocol usage panel on the right shows a real-time breakdown (%) of observed protocols with horizontal bars.
- Press
hto view a packet-size histogram. - Press
dto view HTTP/DNS packet counts. - Press
gto view remote IP geo-mapping.
NSD supports localization of CLI messages and UI labels via JSON translation files. Use the --i18n-file flag to load translations:
sudo ./nsd --i18n-file /path/to/translations.jsonYour JSON file should map message keys to translated strings, for example:
{
"requires_root": "Ce programme nécessite des privilèges root pour capturer des paquets.",
"run_as_root": "Exécutez avec sudo ou en tant qu'administrateur."
}Unrecognized keys fall back to the original English text.
This tool is designed for network administrators and security professionals to monitor networks they own or have explicit permission to monitor. Always ensure you have proper authorization before monitoring any network.
WARNING: Unauthorized network monitoring may be illegal in many jurisdictions and violate privacy laws.
Run unit tests:
go test ./pkg/netcapWe use GitHub Actions to build and test NSD on Linux, macOS, and Windows. The CI workflow is defined in .github/workflows/ci.yml.
MIT