Releases: gsjonio/netwp
Release list
v1.20.0
Adopt the cobra CLI framework
netwp's CLI is now built on cobra, replacing the hand-rolled os.Args dispatch. Every existing command and flag keeps working exactly as before — scripts and docs stay valid — but you now get:
- Per-command help:
netwp scan --help,netwp alias set --help, etc. - Native shell completion:
netwp completion <bash|zsh|fish|powershell>. - Structured grouped commands:
alias,class,watch, andifaceare proper parent + subcommands.
Errors still print in netwp's netwp: <err> style. This is a cmd/netwp-only change; the core/adapter/tui layers are untouched. Closes #78.
Also in this release: GitHub issue templates and a pull request template (community-standards checklist).
v1.19.0
Highlights
scan --class=<class>— filter the scan table (and--json) to one device class (router|computer|mobile|media|printer|iot). Display-only: the scan cache still holds every device, soaliasand--diffare unaffected. An unknown class fails fast, before scanning.- Interactive column sort — press
sinmonitor/dashboardto cycle the sort column (IP, RTT, name, class); the active column shows in the footer. Online devices always sort first; RTT sorts fastest-first. - Fresh names on manual rescan — pressing
rnow drops the 5-minute hostname cache and re-resolves, sorrefreshes the stale name it was pressed for. Automatic re-scans keep the cache.
Plus a direct test for the generic macstore (0% → 78%) and a wiki badge in both READMEs. The wiki now has full pt-BR pages.
v1.18.0
Highlights
--jsonoutput ondoctor,ports, andspeedtest— the read-only diagnostic commands are now scriptable, joiningscan --json. The spinner and notes stay on stderr, so stdout is clean JSON.- Headless monitor (
monitor --quiet) — runs the same scan/track/log loop with no TUI, printing one plain line per join/leave to stdout and persisting each event. Runs as a background service or piped to a logfile; Ctrl-C/SIGTERM stops it cleanly. - Bounded
events.jsonl— once the log passes ~1 MB it's trimmed to the most recent 5000 events, so a long-running monitor can't grow it without limit. - gosec enabled in the lint suite, with hardened config-file permissions (0600/0750).
Both READMEs (EN + pt-BR) updated to match.
v1.17.0
Four usability features, over v1.16.1. Additive minor bump.
Install
go install github.com/gsjonio/netwp/cmd/netwp@v1.17.0Already have netwp? netwp update.
Features
- Filter the device table. In
monitoranddashboard, press/and type to filter by a case-insensitive substring of any field (IP, alias, hostname, vendor, MAC, class). Enter keeps the filter, Esc clears it. The online/known counts still reflect the whole network. netwp events --device=<alias-or-mac>restricts the join/leave history to one device. It resolves an alias to its MAC, so it also catches events logged before the alias was set.netwp scan --ports=22,80,443probes a custom TCP port set instead of the curated default (say, to also check a dev server on 3000). Comma-separated individual ports, no ranges.- Scan errors now surface in the dashboard LOG panel ("scan failed: ...") instead of vanishing silently; the last good device list stays on screen.
Full details in the bilingual README.md / README.pt-BR.md.
v1.16.1
Resolution caching and parser fuzzing, over v1.16.0. Patch bump: transparent internal changes, output unchanged.
Install
go install github.com/gsjonio/netwp/cmd/netwp@v1.16.1Already have netwp? netwp update.
Performance
- Hostname resolution is cached per IP (5 min). The monitor/dashboard re-scans every 10-15s and used to re-resolve every device from scratch each time (reverse DNS, then an mDNS + NetBIOS race). Unresolved devices, the common case, paid that full race on every scan. Now a repeat scan serves names from memory.
- The mDNS service sweep is cached the same way. It fires 12 multicast queries and listens ~1.2s; re-running it every scan was wasteful multicast traffic for data that rarely changes.
Hardening
- Fuzz tests for the DNS/mDNS/ARP wire parsers (
readName,parsePTRAnswer,ptrServiceLabels,parseARPReply), which consume bytes off the network from untrusted hosts. Ran 1M+ executions locally with no crash; the parsers were already defensive. A short fuzzing pass now runs in CI on every push, alongside the race detector added in v1.14.1.
v1.16.0
An operations log on the dashboard, over v1.15.0. Additive minor bump.
Install
go install github.com/gsjonio/netwp/cmd/netwp@v1.16.0Already have netwp? netwp update.
Feature
- LOG panel at the bottom of the dashboard. A running trace of the dashboard's own work — scans starting and finishing (
running scan…/scan done · 5 devices), speedtests (speedtest · 346↓ / 102↑ Mbps), and internet up/down and Wi-Fi connection changes — so you can see what it's doing at a glance. It logs state transitions, not every 5s probe, so it stays readable. Distinct from the ACTIVITY panel (device joins/leaves). - On a short terminal the LOG shrinks, then hides, so the device table and footer always keep priority.
Full details in the bilingual README.md / README.pt-BR.md.
v1.15.0
Resilience-under-load fixes from a performance/availability audit, over v1.14.1. Minor bump: one long-running behavior change (device eviction).
Install
go install github.com/gsjonio/netwp/cmd/netwp@v1.15.0Already have netwp? netwp update.
Fixes (availability)
- Bounded the port-probe socket fan-out.
tcpprobeopened one socket per port with no cap; at ~29 ports times discovery's 32-device fan-out that peaked near 900 concurrent sockets, enough to hit the file-descriptor limit (Linux default 1024) on a busy /24 and fail the scan. Now capped at 16 concurrent dials per device (whole-scan peak ~512). Trade-off: a scan is ~1s slower on a /24 (two probe waves), in exchange for not falling over. - Bounded the tracker's device map. A long
monitor/dashboardsession never forgot departed devices, so the map grew unbounded under MAC randomization (phones rotate MACs) or address spoofing. Devices offline past a 30-minute retention window are now evicted. A device that just left keeps its recent history.
Performance
- Speedtest upload streams its payload instead of allocating 10 MB up front each run (
io.LimitReaderover a zero source). - Dropped a redundant
strings.ToUpperin the OUI vendor lookup (%Xis already uppercase).
Notes
The audit's honest conclusion: netwp has no packet-capture hot path — it's I/O-latency-bound, not CPU/alloc-bound — so there was nothing to micro-optimize. These four are resilience and cleanup, not speed chasing. Every concurrent path is now also covered by the -race CI job added in v1.14.1.
v1.14.1
Internal refactors from a self-audit, over v1.14.0. No behavior change — a patch bump. Every command works exactly as in v1.14.0.
Install
go install github.com/gsjonio/netwp/cmd/netwp@v1.14.1Already have netwp? netwp update.
What changed (code health only)
- Deleted the dead
core.Wakerport (defined, never used as a type). NewDiscovery,RunMonitorandRunDashboardnow take named-field config structs (DiscoveryDeps/MonitorConfig/DashboardConfig) instead of 8–10 positional args.- The alias, class-override and watch stores now share one generic
macstore.Map[V]; the atomic file write lives in one place instead of three copies. - Split the 1007-line
cmd/netwp/main.gointo cohesive files (main/scan/iface/live/cmds/wire); main.go is now ~200 lines. runAliasinlined to matchrunClass/runWatch; aponytail:note documents the tcpprobe fan-out ceiling.
gofmt / go vet / golangci-lint clean; all tests pass; Linux cross-compile verified.
v1.14.0
Watchlist with a leave alert, over v1.13.0. Additive minor bump. Closes out the batch of new features.
Install
go install github.com/gsjonio/netwp/cmd/netwp@v1.14.0Already have netwp? netwp update.
Features
netwp watch add/ls/rm <ip|mac>marks devices whose absence matters (a camera, a home server). Whilemonitorordashboardruns, a watched device leaving highlights its log line ("left (watched)") and rings the terminal bell.- The terminal bell now also fires on the existing unknown-device-join alert, so an unattended monitor is audible when something unexpected shows up or an important device drops.
Full details in the bilingual README.md / README.pt-BR.md and the beginner's guide.
v1.13.0
Wake-on-LAN and a connectivity doctor, over v1.12.0. Additive minor bump.
Install
go install github.com/gsjonio/netwp/cmd/netwp@v1.13.0Already have netwp? netwp update.
Features
netwp wake <ip|mac|alias>broadcasts a Wake-on-LAN magic packet to power on a sleeping device that has WoL enabled. Accepts a nickname (reverse alias lookup) or a cached IP, so a powered-off host still resolves.netwp doctordiagnoses connectivity top-down (interface → gateway → internet → DNS → Wi-Fi) with a tailored hint on each failure — e.g. gateway up but no internet points at the ISP, internet up but DNS down points at the DNS server. Aimed at answering "why is my internet bad" at a glance.
Full details in the bilingual README.md / README.pt-BR.md and the beginner's guide.