日本語版のREADMEはこちら (Japanese version available here)
DNS Stream is a high-performance, terminal-based hybrid DNS traffic observer. It bridges the gap between static query logs and real-time Web APIs to provide a high-density, secure stream of DNS activity directly in your console.
Built with Zig 0.16.0, it leverages non-blocking I/O and a custom network engine to ensure "the only truth" of your network traffic is visible without ever needing to open a web browser.
Unlike traditional log tailers, DNS Stream operates in a dual-phase mode:
- Historical Recovery: Fast-scans local
querylog.jsonvia memory mapping (mmap) to recover recent past events. - Real-time Synchronization: Seamlessly transitions to AdGuardHome Web APIs, using a sliding window and hash-based deduplication (
SeenBuffer) to maintain a jitter-free live stream.
A proprietary network hook system that ensures connectivity even in complex environments:
- TLS Identity Snipe: Directly identifies domain names from TLS certificates during the handshake, even when DNS resolution is obscured.
- Proxy Matrix: Full support for SOCKS5 and HTTP CONNECT tunnels, with integrated identity pinning to prevent man-in-the-middle leakage.
- Zero-Trust Validation: Pre-verifies communication paths using the
--network-probediagnostic suite.
Security is not an afterthought. DNS Stream treats credentials as volatile secrets:
- GPG/Pass Support: Integrates with
.password-storeto decrypt credentials on-the-fly. - Linux Keyring: Temporarily caches secrets in the Linux kernel keyring with strict process-only permissions.
- Memory Safety: Uses
mlockandsecureZeroto ensure passwords never leak to swap space or remain in RAM after authentication.
- Zig 0.16.0 (Required for
std.Ioandstd.httpfeatures) - GnuPG / GPGME (For secure vault integration)
- scdoc (Optional, for generating man pages)
If you are using Arch Linux or an Arch-based distribution (e.g., Manjaro, EndeavourOS), the most reliable way to install is via the AUR (Arch User Repository):
| Package | Version | Description | Votes | Links |
|---|---|---|---|---|
| dns-stream | Unified real-time DNS log stream |
Install using an AUR helper:
# Using yay
yay -S dns-stream
# Using paru
paru -S dns-streammake build
sudo make install- Man Pages: Unix/Linux/macOS users can refer to
man dns-streamfor terminal-native documentation. - Local Manual (Build Output): After running
zig build, copies of the manual are available inzig-out/doc/. This is recommended for environments withoutman(e.g., native Windows). - Full Manual (Repository Source): For web-friendly reading or deep dive:
Standard execution using defaults (reads from /etc/dns-stream/config.json):
dns-streamRetrieve AdGuardHome password from your GPG-encrypted password store:
dns-stream --vault "home/adguard/admin_pass"Start streaming from a specific point in time:
dns-stream --start "2026-01-01T00:00:00"Verify your proxy and TLS connectivity before starting the stream:
dns-stream --network-probe --debugDNS Stream is actively evolving as a universal DNS observation relay.
- Remote API Expansion: Full support for remote (Non-127.0.0.1) AdGuardHome instances with persistent authentication handshaking.
- Pi-hole Ecosystem Support: Integration of Pi-hole FTL APIs and long-term database streaming.
- Multi-Instance Aggregation: Ability to merge streams from multiple DNS nodes into a single unified terminal view.
- Advanced Filtering DSL: Complex query logic (e.g., "show only blocked requests from subnet X that resolved to IP Y").
This project is licensed under the MIT License. See the LICENSE file for details.