Files
speedtest-mkt/README.md
2026-09-28 18:06:40 +07:00

3.7 KiB
Executable File

Internal SpeedTest (Megakreasitech™)

A customized, premium self-hosted HTML5 network performance estimation tool. source of OpenSpeedTestcom


🌟 Overview

This repository contains a highly customized version of the OpenSpeedTest™ engine. It is designed specifically for internal network benchmarking at Megakreasitech™, featuring a polished, modern, glassmorphic UI, responsive layout adjustments, and localized behavior.

No client-side software, plugins, or flash are required. You can run speed tests from any modern device with a web browser (including smartphones, smart TVs, and desktop PCs).


✨ Customizations & Enhancements

Compared to the default upstream OpenSpeedTest deployment, this repository includes several improvements and customizations:

  1. Premium Modern UI (Design System):
    • Clean, vibrant, and premium card layouts featuring modern typography (Google Fonts Outfit & Inter).
    • Glassmorphism effects with soft shadows and tailored HSL colors.
    • Smooth CSS transitions and micro-animations (e.g., hover effects on gauges, buttons, and logos).
    • Support for Dark Mode and Light Mode out-of-the-box.
  2. Branding & Localization:
    • Custom outro display showing Megakreasitech™ inside the gauge when the test finishes.
    • Localized header, logo, and footer credits.
  3. Optimized IP Address Display:
    • The "Your IP Address" section has been repositioned precisely above the gauge.
    • It is dynamically responsive: aligned left over the gauge on desktop (landscape) and centered above the gauge on mobile (portrait) with proportional spacing.

🚀 Deployment Instructions

This application only consists of static HTML, CSS, JS, and SVG files.

For maximum performance, we recommend deploying it on a bare-metal Linux server running Nginx with caching disabled for the testing endpoints.

Nginx Configuration Example:

server {
    listen 80;
    server_name localhost;

    root /path/to/Speed-Test-main;
    index index.html;

    gzip on;
    gzip_types text/css application/javascript image/svg+xml;

    # Caching disabled for download test endpoint
    location = /downloading {
        access_log off;
        add_header 'Access-Control-Allow-Origin' '*' always;
        add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, HEAD' always;
        add_header 'Access-Control-Allow-Headers' 'Content-Type, X-Requested-With' always;
        add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, max-age=0' always;
        try_files /downloading =404;
    }

    # Fetch client IP endpoint
    location = /getIP {
        access_log off;
        default_type text/plain;
        add_header 'Access-Control-Allow-Origin' '*' always;
        return 200 $remote_addr;
    }

    # Caching disabled for upload test endpoint
    location = /upload {
        access_log off;
        add_header 'Access-Control-Allow-Origin' '*' always;
        add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, HEAD' always;
        add_header 'Access-Control-Allow-Headers' 'Content-Type, X-Requested-With' always;
        client_max_body_size 50m;
        
        if ($request_method = POST) {
            return 200;
        }
        if ($request_method = OPTIONS) {
            return 200;
        }
        try_files /upload =200;
    }
}

2. Using Docker Compose

You can spin up this customized application quickly using the provided docker-compose.yml file:

version: '3.3'
services:
  speedtest:
    build: .
    restart: unless-stopped
    container_name: mkt_speedtest
    ports:
      - '80:80'

To run:

docker-compose up -d