@echo off
setlocal enabledelayedexpansion
title GitHub mirror speed test
set "GH=github.com/shinyflvre/Mate-Engine/releases/download/Public-Release-X3.3.0/Public.Release.X3.3.0-HOTFIX-1.zip"
set MIRRORS=ghfast.top gh-proxy.com gh.xxooo.cf ghproxy.net gitmirror.com

echo Testing each mirror for 8 seconds, downloading an 8MB slice.
echo Higher speed = better. Anything above 500000 B/s is usable.
echo.

for %%m in (%MIRRORS%) do (
    echo === %%m ===
    curl.exe -s -o NUL -m 8 -r 0-8000000 -w "    HTTP %%{http_code}   speed %%{speed_download} B/s\n" "https://%%m/https://%GH%"
    echo.
)

echo Done. Pick the fastest one and use it in the download command.
pause
