Skip to content

Latest commit

 

History

History
242 lines (168 loc) · 5.7 KB

README.md

File metadata and controls

242 lines (168 loc) · 5.7 KB

🌊 Aqua Speed

Aqua Speed - Banner

A modern network speed test CLI built with Bun and TypeScript.

TypeScript Bun Biome License

English | 简体中文

🌟 Features

  • 🚀 High-performance speed testing powered by Bun runtime
  • ✨ Multiple test servers support:
    • Cloudflare (download & upload)
    • LibreSpeed (download & upload)
    • Ookla (TODO)
    • Custom file URL (download only) 1
  • 🧵 Concurrent testing with configurable threads
  • 📊 Comprehensive metrics:
    • TCP/ICMP/HTTP latency
    • Download/Upload speeds
    • Jitter analysis
  • 🎨 Beautiful CLI interface with real-time progress
  • 🛡️ Full TypeScript type support, Biome constrained code style.

⭐ Supported Servers

Server Type Upload Download Latency Remarks
Speedtest.net 🔶 🔶 🔶 Development
LibreSpeed
Cloudflare Speed speed.cloudflare.com
Single File Not support upload test
Looking Glass 🔶 Development
Taierspeed 🔶 🔶 🔶 Development
Speedtest.cn 🔶 🔶 🔶 Development

🌟 Demo

asciicast

🔥 Run

🚀 Run from CI Build

Download the latest binary compressed package from Releases

Linux & macOS

chmod +x aqua-speed
./aqua-speed

Windows

./aqua-speed.exe 

🐳 Run from Docker

docker run -it ghcr.io/alice39s/aqua-speed:latest

🛠️ Run from Source

1. Install Bun

# Linux & macOS
curl -fsSL https://bun.sh/install | bash

# Windows
powershell -c "irm bun.sh/install.ps1 | iex"

# Windows (Package Manager)
scoop install bun

2. Clone repository

git clone https://github.com/Alice39s/aqua-speed.git

3. Install dependencies

bun install

4. Run

bun run start

Basic Usage

Quick Start

# Run with defaults (Cloudflare server, 4 threads)
aqua-speed

# Test against LibreSpeed server
aqua-speed --type LibreSpeed

# Test with custom file URL
aqua-speed -s https://example.com/testfile.dat

Advanced Options

aqua-speed [options]

Options:
  -s, --server <url>     Speed test server URL
  --sn <name>            Speed test server name 
  -t, --thread <number>  Number of concurrent connections  
  --timeout <seconds>    Test timeout in seconds
  --debug               Debug mode
  --type <type>         Test type (SingleFile|LibreSpeed|Cloudflare)

🔍 Example Output

Test Results:

    Latency:
        TCP: min = 1.25 ms, avg = 2.19 ms, max = 3.38 ms
        ICMP: min = 1.00 ms, avg = 1.00 ms, max = 1.00 ms
        HTTP: min = 97.74 ms, avg = 100.71 ms, max = 103.68 ms

    Speed:
        Download: min = 570.55 Mbps, avg = 1.17 Gbps, max = 1.36 Gbps
        Upload: min = 601.25 Mbps, avg = 1.20 Gbps, max = 1.39 Gbps

    Test Information:
        Server: speed.cloudflare.com
        Time: 2024/12/25 12:00:00

🐛 Troubleshooting

Common Issues

  1. Permission denied
chmod +x aqua-speed
  1. Low speeds
  • Reduce threads: -t 2
  • Test with different servers

Debug Mode

Enable debug logging for detailed information:

./aqua-speed --debug

🛠️ Development

# Install dependencies
bun install

# Run in development
bun run dev

# Run tests
bun test

# Build binary
bun run build:binary

📜 Code Style

This project uses Biome for code formatting and linting (using biome format and biome check):

# Format code
bun run format

# Lint code
bun run lint

📖 Changelog

See CHANGELOG.md for more details.

🚧 Roadmap

See Roadmap.md for more details.

🍴 Contributing

  1. Fork repository
  2. Create feature branch
  3. Commit changes
  4. Run tests
  5. Submit pull request

Please ensure:

  • Tests pass
  • Code follows Biome standards
  • Commit messages are clear
  • Documentation is updated

📜 License

GPL-3.0 License

🙏 Acknowledgements

  • Bun - JavaScript runtime & toolkit
  • LibreSpeed - Open source speed test
  • All contributors

Footnotes

  1. Recommended to specify a file of at least 10MB.