Skip to content

uoox/gdcuspeed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guangdong Unicom Speedtest CLI

A high-performance command-line internet speed test tool written in Rust, tailored for China Guangdong Unicom users. It communicates directly with the Unicom-hosted test servers to measure latency, jitter, download, and upload speeds.

Features

  • Auto-Config: Automatically fetches client IP, ISP account, area ID, bandwidth plan, and test servers from the Guangdong Unicom API.
  • Latency & Jitter: Measures RTT min, avg, max, and jitter (mean absolute difference) using lightweight Range requests.
  • High Concurrency: Uses tokio and reqwest to run parallel streams, easily saturating gigabit connections.
  • No Disk I/O: Discards downloaded bytes in memory and streams dummy bytes for uploads, avoiding local disk bottlenecks.
  • Interactive UI: Displays real-time speeds (in Mbps and MB/s) and peak speeds using progress bars.

Usage

Run on macOS

The release binary is already built. Run it in the target directory:

./target/release/gd-unicom-speedtest

Options

You can configure test duration, concurrent connections, or skip phases:

# Run a shorter speedtest (5 seconds for download, 5 seconds for upload)
./target/release/gd-unicom-speedtest -d 5 -u 5

# Saturate a 10Gbps line by increasing concurrency
./target/release/gd-unicom-speedtest -c 16 -p 16

# Skip upload test
./target/release/gd-unicom-speedtest --skip-upload

# Show help menu
./target/release/gd-unicom-speedtest --help

Compiling for Linux

Native Build on Linux (Recommended)

If you have a Linux machine, copy this directory to the machine and build it:

  1. Ensure Rust/Cargo and SSL development libraries are installed. On Ubuntu/Debian:
    sudo apt update
    sudo apt install -y build-essential pkg-config libssl-dev
  2. Build the project:
    cargo build --release
  3. Run the compiled binary:
    ./target/release/gd-unicom-speedtest

Cross-Compiling from macOS to Linux x86_64

To build a static binary for Linux from your Mac, you can use cross (Docker required):

  1. Install the cross tool:
    cargo install cross --git https://github.com/cross-rs/cross
  2. Run target build:
    cross build --target x86_64-unknown-linux-musl --release

The compiled binary will be located at target/x86_64-unknown-linux-musl/release/gd-unicom-speedtest.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages