Introduction¶
When running DSH, people often wonder how the network on the current machine is performing: what the IP is, what the MAC is, the up/down speeds, how many TCP sessions are piling up, and how the latency to the gateway and the internet is fluctuating. Back in the day, this required opening “Activity Monitor” in another window, typing ifconfig, netstat, and ping in the terminal alternately, and then comparing timestamps manually. foreee/dsh-net-dashboard collects and displays this data inside the DSH sidebar, polling every 3 seconds, so it keeps refreshing even if you aren’t looking at the menu.
First, let’s clarify what this is: It is maintained by foreee, is a client-side plugin, and adds a network inspection dashboard to the DSH sidebar. It displays the local IP/MAC, traffic rates, session counts, and latency curves. It has 0 stars on the directory page and is still in its early stages.
Core Features¶
The panel is attached under the DSH built-in sidebar item. It uses a key-first layout: a KPI bar plus four cards. Each card defaults to collapsed core numbers, expanding only when Details is clicked.
The KPI bar typically displays four items: Download Speed, Upload Speed, Gateway Latency, and TCP Session Count.
The four cards correspond to:
-
Real-time Traffic — Aggregated up/down speeds (excluding loopback), with a scrolling curve and peak values. When Details are expanded, it shows the rate for each interface and cumulative send/receive counts.
-
Latency — A compact card for each target: current value, packet loss percentage, and a 1-second resolution mini curve. The default gateway is always followed, and public targets can be configured. When Details are expanded, it shows Average/Min/Max/Jitter/Packet Loss/Send/Receive statistics.
-
Sessions — Total TCP sessions, number of UDP sockets, and a Top status bar. When Details are expanded, it shows a full distribution of TCP states and the session count trend.
-
Network — For the main interface, view IPv4, Gateway, DNS resolvers, and Public IP. When Details are expanded, it shows IPv6, MAC, Wi-Fi info, hostname, OS version, a full interface table, and real-time rates per interface.
Both dark and light themes are adapted, and charts use shell theme tokens for coloring.
Installation and Enablement¶
Official installation command:
dsh plugin --profile desktop add "github:foreee/dsh-net-dashboard"
For the browser profile, use --profile web. The Plugins page on the Web side and the plugin_manager tool also accept the same address. The plugin is pure JavaScript, has no build steps, and no third-party dependencies.
It is enabled by default after installation, and the sidebar panel can be seen without additional configuration.
Typical Usage¶
After installation, you just need to glance at the sidebar. To add public network latency targets, modify the configuration:
{
"pingTargets": ["119.29.29.29", "8.8.8.8"]
}
Other configuration items:
enabled: defaulttrue, set tofalseto not mount anything.pingTargets: default["223.5.5.5"]. The default gateway is always followed; this is just for additional public targets.publicIp: defaulttrue, enables caching public IP queries for 10 minutes; can be turned off.
The browser-side polling interval defaults to 3 seconds and can be switched in the interface; the choice is saved to localStorage.
How It Works¶
On the host side, lib/index.js mounts a route that only goes through loopback:
| Route | Method | Purpose |
|---|---|---|
api/net-dashboard/snapshot |
GET | A complete snapshot: interfaces, main interface facts, traffic, sessions, latency |
Each request runs ifconfig, route, netstat, and scutil --dns (all with upper limit protection), and Wi-Fi related facts are supplemented with ipconfig getsummary. Traffic rates are derived by taking the difference between byte counts from netstat -ib and the previous sample in memory. Latency relies on a persistent ping -i 1 subprocess (one per target, restarts on failure, stops with the plugin). These feed into a rolling window, and the route only reads from the window, so a 3-second polling cycle won’t cause a command storm. Public IP queries are cached for 10 minutes and can be disabled.
On the browser side, lib/client.js pulls a snapshot every 3 seconds and maintains its own rolling history for traffic and session curves. All charts are inline SVGs and do not rely on chart libraries.
This route has two layers of protection: the socket and Host headers must both come from loopback, and the same-origin flag is verified. Paired remote devices will be rejected.
Applicable Scenarios and Notes¶
Suitable for those running DSH on macOS who want to see their local network status at any time. The collection commands and parsers are written for macOS, so Linux/Windows are not supported.
A few known limitations:
- When Location permission is not granted, macOS hides Wi-Fi SSID/RSSI, so these lines are omitted.
- Traffic rates require two samples to differentiate, so the first polling cycle displays
—.
Also, a general note: the plugin runs with the permissions of the current dsh process. Before installing, it is recommended to check lib/index.js, lib/client.js, and the LICENSE to ensure the command call scope and license (MIT) meet your environment requirements.
Development and Verification¶
Test and check commands in the repository:
node --test test/*.test.js # parser、trust-fence、loopback-guard tests
node --check lib/index.js && node --check lib/client.js
The package declares type: module, has main as lib/index.js, requires @deepseek-ai/dsh >= 0.2.0-rc.2 as a peerDependency, and is currently version 0.1.0.
Conclusion¶
In summary: It encapsulates the collection, difference calculation, polling, and charting of local network status into a single plugin, saving the process of opening multiple windows and typing commands. The directory page is at https://www.skillhub.cn/plugins/foreee/dsh-net-dashboard, and the source code is at https://github.com/foreee/dsh-net-dashboard.