一个基于 Golang 的轻量级测速命令行工具,使用高性能的 Aqua Speed 测速内核,内置多种 CDN 节点测试预设。
- 🔄 内置多种 CDN 节点测试
- 🚀 自动更新程序版本
- 📊 支持单节点或批量测试
- 🎨 美观的表格输出格式
- 🔧 多线程并发下载测试
- 🔌 支持 Patch 动态更新 (TODO)
- 🌐 支持自定义镜像源
- 🛡️ 支持 DNS over HTTPS
# 需安装 curl
curl -sL "https://github.com/alice39s/aqua-speed-tools/releases/latest/download/aqua-speed-tools-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')" -o aqua-speed-tools
# 国内用户可选镜像
curl -sL "https://s3-lb01.000000039.xyz/download/Alice39s/aqua-speed-tools/latest/download/aqua-speed-tools-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')" -o aqua-speed-tools
chmod +x aqua-speed-tools
./aqua-speed-tools
# 国内用户可使用镜像模式
./aqua-speed-tools --use-mirrors
# 64位, 需安装 curl
curl -sL https://github.com/alice39s/aqua-speed-tools/releases/latest/download/aqua-speed-tools-windows-amd64.exe -o aqua-speed-tools.exe
# 国内用户可选镜像
curl -sL https://s3-lb01.000000039.xyz/download/Alice39s/aqua-speed-tools/latest/download/aqua-speed-tools-windows-amd64.exe -o aqua-speed-tools.exe
./aqua-speed-tools.exe
# 国内用户可使用镜像模式
./aqua-speed-tools.exe --use-mirrors
各平台预编译版本下载链接:
平台 | 架构 | 下载链接 |
---|---|---|
🐧 Linux | amd64 | GitHub 源 / 镜像源 |
🐧 Linux | arm64 | GitHub 源 / 镜像源 |
🖥️ Windows | amd64 | GitHub 源 / 镜像源 |
🖥️ Windows | arm64 | ×1 |
🍎 macOS | amd64 | GitHub 源 / 镜像源 |
🍎 macOS | arm64 | GitHub 源 / 镜像源 |
# 克隆仓库
git clone https://github.com/alice39s/aqua-speed-tools.git
cd aqua-speed-tools
# 编译
go build -o aqua-speed-tools cmd/tools/main.go
直接运行程序即可进入交互式模式:
./aqua-speed-tools
# 列出所有可用节点
./aqua-speed-tools list
# 测试指定节点速度
./aqua-speed-tools test <节点ID>
# 开启调试模式
./aqua-speed-tools -d
# 使用自定义 GitHub Raw 镜像
./aqua-speed-tools --github-raw-magic-url https://raw.example.com
# 使用自定义 GitHub API 镜像
./aqua-speed-tools --github-api-magic-url https://api.example.com
# 使用自定义 DNS over HTTPS 端点
./aqua-speed-tools --doh-endpoint https://doh.pub/dns-query
# 查看帮助
./aqua-speed-tools -h
程序会自动在以下位置创建配置文件,您可以 根据需要 进行修改:
- Windows:
%APPDATA%/aqua-speed-tools/base.json
- Linux:
/etc/aqua-speed-tools/base.json
- MacOS:
~/Library/Application\ Support/aqua-speed-tools/base.json
配置文件包含以下主要部分:
字段 | 说明 | 类型 | 示例 |
---|---|---|---|
script.version |
程序版本号 | string |
"3.0.0" |
script.prefix |
程序前缀 | string |
"aqua-speed-tools" |
download_timeout |
下载超时时间(秒) | number |
30 |
字段 | 说明 | 类型 | 示例 |
---|---|---|---|
github_api_magic_url |
GitHub API 镜像 | string |
"[alice39s/aqua-speed](https://s3-lb01.000000039.xyz/api/)" |
github_raw_jsdelivr_set |
JSDelivr 镜像列表 | string[] |
["https://gcore.jsdelivr.net/gh"] |
字段 | 说明 | 类型 | 示例 |
---|---|---|---|
dns_over_https_set |
DoH 服务器配置 | object[] |
见下方示例 |
每个 DoH 配置包含:
字段 | 说明 | 类型 | 示例 |
---|---|---|---|
endpoint |
服务器端点 | string |
"https://cloudflare-dns.com/dns-query" |
timeout |
超时时间(秒) | number |
10 |
retries |
重试次数 | number |
3 |
{
"binary": {
"prefix": "aqua-speed"
},
"script": {
"version": "3.0.0",
"prefix": "aqua-speed-tools"
},
"github_api_base_url": "https://api.github.com",
"github_api_magic_url": "https://s3-lb01.000000039.xyz/api/",
"github_raw_base_url": "https://raw.githubusercontent.com",
"github_raw_jsdelivr_set": [
"https://gcore.jsdelivr.net/gh",
"https://fastly.jsdelivr.net/gh",
"https://testingcf.jsdelivr.net/gh",
"https://cdn.jsdelivr.net/gh"
],
"dns_over_https_set": [
{
"endpoint": "https://dns.alidns.com/dns-query",
"timeout": 10,
"retries": 3
},
{
"endpoint": "https://cloudflare-dns.com/dns-query",
"timeout": 10,
"retries": 3
}
],
"table_padding": 2,
"log_level": "info",
"download_timeout": 30
}
- 💫 支持将结果上传到服务器,并生成一个易于分享的网页和 OpenGraph 图片
- 📊 list 和 test 命令输出为 Markdown, CSV, JSON 等格式
- 🔄 支持 Patch 动态更新
- 🎨 优化表格输出
- 💬 多语言支持
- 🛡️ 支持 DNS over HTTPS
本项目采用 AGPL-3.0 开源许可证。
Footnotes
-
由于测速客户端主程序 aqua-speed 使用 Bun 编写,而 Bun 暂不支持 Linux 交叉编译至 Windows ARM64 架构,如有需要,请自行 编译安装。 ↩