Skip to content

Latest commit

 

History

History
88 lines (69 loc) · 1.79 KB

File metadata and controls

88 lines (69 loc) · 1.79 KB

Despeed CLI

CLI version of Despeed speed test automation tool that runs directly from terminal/console.

Features

  • Automated speed testing using M-Lab servers
  • Integration with Despeed points system
  • Smart eligibility checking and waiting system
  • Detailed logging and status updates
  • Retry mechanism for failed tests
  • Proxy support (optional)

Prerequisites

  • Node.js >= 16
  • npm or yarn
  • A Despeed account with valid JWT token

Installation

  1. Clone this repository:
git clone https://github.com/aritlhq/despeed.git
cd despeed
  1. Install dependencies:
npm install
  1. Configure environment variables:
cp .env-example .env
  1. Edit .env file with your credentials:
npm run dev

The program will:

  • Check eligibility for speed test
  • Run speed test if eligible:
    • Download test
    • Upload test
  • Submit results to Despeed
  • Wait for next eligible time
  • Repeat automatically

Configuration

Key settings in index.js:

const CHECK_INTERVAL = 5 * 60 * 1; // Check interval in minutes
const WS_OPTIONS = {
    handshakeTimeout: 30000,
    maxPayload: 104857600,
    // ...other WebSocket options
};

Status Messages

The program provides detailed status updates:

=== Starting new test cycle ===
Current time: 2025-01-12T22:37:49.933Z

Status Summary:
-------------------
Tests Today: 4/4
Waiting Time: 293 minutes
Next Check: 2025-01-13T03:30:48.859Z
-------------------

Error Handling

  • Connection errors: Automatic retry with exponential backoff
  • Authentication errors: Program will exit and notify
  • API errors: Detailed error logging with status codes

Contributing

Feel free to submit issues and pull requests.

License

MIT LICENSE