

# Winload
> 輕量級實時終端網路流量監控工具,靈感來自 Linux 的 nload。
> **[📖 English](readme.md)**
> **[📖 简体中文(大陆)](readme.zh-cn.md)**
> **[📖 繁體中文(台灣)](readme.zh-tw.md)**
> **[📖 文言文](readme.lzh.md)**
> **[📖 日本語](readme.jp.md)**
> **[📖 한국어](readme.ko.md)**
[](https://github.com/VincentZyuApps/winload)
[](https://gitee.com/vincent-zyu/winload)
[](https://github.com/VincentZyuApps/winload/releases)
[](https://github.com/VincentZyuApps/winload/releases)
[](https://github.com/VincentZyuApps/winload/releases)
[](https://github.com/VincentZyuApps/winload/releases)
[](https://pypi.org/project/winload/)
[](https://crates.io/crates/winload)
[](https://www.npmjs.com/package/@vincentzyuapps/winload)
[](https://scoop.sh/#/apps?q=%22https%3A%2F%2Fgithub.com%2FVincentZyuApps%2Fscoop-bucket%22&o=false)
[](https://aur.archlinux.org/packages/winload-rust-bin)
[](https://github.com/VincentZyuApps/winload/releases)
[](https://github.com/VincentZyuApps/winload/releases)
[](https://github.com/VincentZyuApps/homebrew-tap/blob/main/Formula/winload.rb)
> **[📖 建置文檔](.github/workflows/build.zh-tw.md)**
## 🚀 簡介
`Winload` 是一個直觀的終端網路流量監控工具。最初為 Windows 打造,彌補 `nload` 在 Windows 上的空白,現已支援 Linux 和 macOS。
## 🙏 致謝
Winload 的靈感來自 Roland Riegel 的經典 「[nload](https://github.com/rolandriegel/nload)」 項目,感謝原作者的創意與體驗。
https://github.com/rolandriegel/nload
## ✨ 主要特性
- **雙實現版本**
- **Rust 版**: 快速、內存安全、單靜態二進製文件,適合日常監控。
- **Python 版**: 易於修改和擴展,適合原型開發或集成。
- **跨平台**: Windows、Linux、macOS(x64 & ARM64)。
- **實時可視化**: 實時上行/下行流量圖和吞吐量統計。
- **簡潔界面**: 乾淨的 TUI,沿襲 nload 的人體工程學設計。
## 📊 效能基準測試
> ⚡ Winload (Rust) 實現 **~10ms 啟動速度** 和 **<2MB 二進位檔案體積**,在效率上顯著優於 Python 並與 C++ nload 相當。

## 🔧 從原始碼執行
### Python
```bash
git clone https://github.com/VincentZyuApps/winload.git
# 或從 Gitee 克隆(中國大陸更快):
# git clone https://gitee.com/vincent-zyu/winload.git
cd winload/python
uv venv --python 3.13
uv pip install -r requirements.txt
uv run python main.py
```
### Rust
```bash
git clone https://github.com/VincentZyuApps/winload.git
cd winload/rust
cargo run --release
cargo run --release -- --help # 顯示說明
cargo run --release -- --version # 顯示版本
```
## 🐍 Python 版本安裝
> 💡 **實作說明**:僅 PyPI 和 GitHub/Gitee 源代碼是 Python 版本。
> 僅 Cargo 提供 Rust 原始碼供本地編譯。
> 所有其他套件管理器(Scoop、AUR、npm、APT、RPM)及 GitHub Releases 均提供 **Rust 二進制文件**。
### Python (pip)
```bash
pip install winload
# 推薦使用 uv:
# https://docs.astral.sh/uv/getting-started/installation/
# https://gitee.com/wangnov/uv-custom/releases
uv venv --python 3.13
uv pip install winload
uv run winload
uv run python -c "import shutil; print(shutil.which('winload'))"
```
## 📥 Rust 版本安裝(推薦)
### npm (跨平台)
```bash
# 推薦(scoped)
npm install -g @vincentzyuapps/winload
# 備選(unscoped)
npm install -g winload-rust-bin
# 備選(GitHub Packages)
npm install -g @vincentzyuapps/winload --registry https://npm.pkg.github.com
# 在 Windows 上使用 win-nload 以避免與 System32\winload.exe 衝突
# 在 Linux/macOS 上,winload 和 win-nload 均可使用
# 或直接使用 npx
npx @vincentzyuapps/winload
```
> 包含 4 個預編譯二進制文件:x86_64 & ARM64 版本,支援 Windows、Linux 和 macOS。
### Cargo (原始碼編譯)
```bash
cargo install winload
cargo install --list
```
### Windows (Scoop)
> 📄 [Scoop Bucket (GitHub)](https://github.com/VincentZyuApps/scoop-bucket/blob/main/bucket/winload.json)
> 📄 [Scoop Bucket (Gitee)](https://gitee.com/vincent-zyu/scoop-bucket/blob/main/bucket/winload.json)
```powershell
scoop bucket add vincentzyu https://github.com/VincentZyuApps/scoop-bucket
# 或從 Gitee 克隆:
# scoop bucket add vincentzyu https://gitee.com/vincent-zyu/scoop-bucket
scoop update # optional: 提前手動更新 bucket 列表
scoop install winload
# 執行二進位檔案
win-nload
Get-Command win-nload # Powershell
where win-nload # CMD
```
> 💡 建議使用 [Windows Terminal](https://github.com/microsoft/terminal) 而非舊版 Windows Console,以獲得正確的中文字元渲染和更好的 TUI 體驗。
> ```powershell
> scoop bucket add versions
> scoop install windows-terminal-preview
> wtp
> ```
> 💡 **所有構建均需 Windows 10+**(Rust 1.77+ 已放棄支援 Windows 7/8)。Scoop 和 npm 預設提供 **x86_64** 和 **ARM64** 的 **MSVC + Npcap** 構建。這些構建現在會延遲載入 `wpcap.dll`,可降低尚未使用 `--npcap` 前的啟動失敗風險,但回環擷取仍然需要系統已安裝 Npcap。
### Arch Linux (AUR):
```bash
paru -S winload-rust-bin
which winload
```
### Debian & RedHat 系發行版 / Termux(一鍵安裝指令稿)
> 支援 Debian/Ubuntu 及其衍生版 —— Linux Mint、Pop!_OS、Deepin、UnionTech OS 等 (apt)
> 支援 Fedora/RHEL 及其衍生版 —— Rocky Linux、AlmaLinux、CentOS Stream 等 (dnf)
> 也支援 Android 上的 Termux (aarch64)
```bash
curl -fsSL https://raw.githubusercontent.com/VincentZyuApps/winload/main/docs/install_scripts/install.sh | bash
which winload
```
> 📄 [查看安裝指令稿原始碼](https://github.com/VincentZyuApps/winload/blob/main/docs/install_scripts/install.sh)
**🇨🇳 Gitee 鏡像(大陸地區下載更快):**
```bash
curl -fsSL https://gitee.com/vincent-zyu/winload/raw/main/docs/install_scripts/install_gitee.sh | bash
which winload
```
> 📄 [查看 Gitee 安裝指令稿原始碼](https://gitee.com/vincent-zyu/winload/blob/main/docs/install_scripts/install_gitee.sh)
> ⚠️ 以上兩個 `curl ... | bash` 安裝指令稿支援 **x86_64 / aarch64** 架構上使用 **apt**(Debian/Ubuntu)、**dnf**(Fedora/RHEL)或 **Termux**(Android)的系統。其他平台請使用 **npm**(`npm install -g @vincentzyuapps/winload`)或 **Cargo**(`cargo install winload`)安裝。
### macOS / Linux(Homebrew)
> 📄 [Homebrew Formula (GitHub)](https://github.com/VincentZyuApps/homebrew-tap/blob/main/Formula/winload.rb)
> 📄 [Homebrew Formula (Gitee)](https://gitee.com/vincent-zyu/homebrew-tap/blob/main/Formula/winload.rb)
> 較新的 Homebrew 可能要求先信任第三方 tap 的 formula 後再安裝。
```bash
brew tap vincentzyuapps/tap
brew trust vincentzyuapps/tap
# 或從 Gitee(手動克隆 tap):
# git clone https://gitee.com/vincent-zyu/homebrew-tap.git "$(brew --prefix)/Library/Taps/vincentzyuapps/homebrew-tap"
brew update && brew install winload
which winload
```
> 💡 Homebrew 支援 **macOS**(Intel 和 Apple Silicon)和 **Linux**(x86_64 和 ARM64)。
手動安裝
**DEB (Debian/Ubuntu):**
```bash
# 從 GitHub Releases 下載最新 .deb 包
sudo dpkg -i ./winload*.deb
# 或使用 apt(自動處理依賴)
sudo apt install ./winload*.deb
which winload
```
**RPM (Fedora/RHEL):**
```bash
sudo dnf install ./winload*.rpm
which winload
```
**或者直接從 [GitHub Releases](https://github.com/VincentZyuApps/winload/releases) 下載二進制文件。**
## ⌨️ 用法
```bash
winload # 監控所有活躍網路藉口
winload -t 200 # 設定刷新間隔為 200ms
winload -d "Wi-Fi" # 啟動時定位到 Wi-Fi 網卡
winload --title "我的監視器" # 使用自訂頂部標題
winload -e # 啟用 emoji 裝飾 🎉
winload --max-mode smart --max-half-life 10 # 平滑自適應 Y 軸(預設)
winload --max-mode legacy # nload 風格的可見歷史峰值縮放
winload --max-mode fixed --max-y-value 10M # 固定 Y 軸上限
winload --npcap # 擷取 127.0.0.1 回環流量 (Windows,需安裝 Npcap)
winload --netlink # 手動啟用 RTNETLINK(Linux/Android,預設關閉)
```
### 參數選項
| 參數 | 說明 | 預設值 |
|------|------|--------|
| `-t`, `--interval ` | 刷新間隔(毫秒) | `500` |
| `-a`, `--average ` | 平均值計算視窗(秒) | `300` |
| `-d`, `--device ` | 預設裝置名稱(模糊比對) | — |
| `--title [TITLE]` | 在裝置標題上方新增標題行:不帶值時顯示 `winload <版本號>`;空字串(或省略)時僅顯示預設裝置標題 | — |
| `-e`, `--emoji` | 啟用 emoji 裝飾 🎉 | 關閉 |
| `-U`, `--unicode` | 使用 Unicode 方塊字元繪圖(█▓░·) | 關閉 |
| `-u`, `--unit ` | 顯示單位:`bit` 或 `byte` | `bit` |
| `-b`, `--bar-style