Metadata-Version: 2.4
Name: portbug
Version: 0.1.0
Summary: Port-level network measurement client for registered portbug nodes
Author: portbug
License-Expression: MIT
Project-URL: Homepage, https://portbug.com
Project-URL: Documentation, https://portbug.com/docs
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: System :: Networking
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# portbug

`portbug` 是 [portbug.com](https://portbug.com) 的 Python 命令行客户端，用于从本机测量已登记测速节点上的 TCP 与 UDP 端口吞吐。

它只接受中心登记的节点 ID，不支持任意 IP 或域名作为目标，避免被误用为对第三方的流量工具。

## 安装

```bash
python -m pip install -U portbug
```

## 使用

列出可用节点：

```bash
portbug nodes
```

测试 TCP 443、80 的上下行：

```bash
portbug port 443 80 --to sh-spot
```

测试 UDP 443 的上下行（默认速率 50 Mbps，避免无节制 UDP 发送）：

```bash
portbug port 443 --udp --to sh-spot --rate-mbps 50
```

输出 JSON，便于脚本或 AI 工具读取：

```bash
portbug port 443 --to sh-spot --json
```

默认中心是 `https://portbug.com`。私有部署可用 `--center` 或 `PORTBUG_CENTER` 指定自己的中心。

## 当前范围

Python 版提供节点查询、端口探测、TCP/UDP 上下行吞吐和 JSON 输出；桌面版中的报告、账户、协议模拟、实时曲线等功能仍由 Go/Wails 客户端提供。

