Everyday-use client-side map-aware mirror ranking tool (Arch Linux; Manjaro; custom ones)
翻译准备中
开发工具Rust · MakefileGitHub @westandskif自行安装运营者未确认
试用过了吗? 点一下就好,无需登录。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗A fast mirror ranking tool that finds the best mirrors for your Linux distribution. It uses submarine cable and internet exchange data to intelligently hop between countries and discover fast mirrors in ~30 seconds.
# Arch Linux
rate-mirrors arch | sudo tee /etc/pacman.d/mirrorlist
# Manjaro
rate-mirrors manjaro | sudo tee /etc/pacman.d/mirrorlist
# With backup
export TMPFILE="$(mktemp)"; \
rate-mirrors --save=$TMPFILE arch --max-delay=21600 \
&& sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist-backup \
&& sudo mv $TMPFILE /etc/pacman.d/mirrorlist
# See all options
rate-mirrors --help
| Platform | Command | Notes |
|---|---|---|
| Arch Linux (default) | sudo pacman -S rate-mirrors | Pre-built, dynamically linked glibc |
| Arch Linux (AUR, binary) | yay -S rate-mirrors-bin | Pre-built, statically linked musl |
| Arch Linux (AUR, source) | yay -S rate-mirrors-git | Build from source, dynamically linked glibc |
| OpenBSD | pkg_add rate-mirrors | From ports |
| GitHub Releases | Download | Pre-built binaries |
| From source | cargo build --release --locked | Requires Rust toolchain |
| Command | Distribution | Notes |
|---|---|---|
rate-mirrors arch | Arch Linux | Skips outdated/syncing mirrors |
rate-mirrors arch4edu | Arch4edu | |
rate-mirrors archarm | Arch Linux ARM | |
rate-mirrors arcolinux | ArcoLinux | |
rate-mirrors artix | Artix Linux | Skips outdated/syncing mirrors |
rate-mirrors blackarch | BlackArch Linux | |
rate-mirrors cachyos | CachyOS | |
rate-mirrors chaotic-aur | Chaotic-AUR | Arch Linux repository |
rate-mirrors archlinuxcn | Arch Linux CN | Chinese community repo |
rate-mirrors endeavouros | EndeavourOS | Skips outdated mirrors |
rate-mirrors manjaro | Manjaro | Skips outdated mirrors |
rate-mirrors rebornos | RebornOS |
| Command | Distribution |
|---|---|
rate-mirrors openbsd | OpenBSD |
rate-mirrors stdin | Custom mirrors (see Advanced Usage) |
rate-mirrors [OPTIONS] <SUBCOMMAND> [SUBCOMMAND-OPTIONS]
rate-mirrors --help to see base optionsrate-mirrors <subcommand> --help to see subcommand-specific options--allow-root if you must run as root| Option | Description | Default |
|---|---|---|
--save=FILE | Save output to file instead of stdout | - |
--concurrency=N | Number of simultaneous speed tests | 16 |
--max-jumps=N | Maximum country hops | 7 |
--entry-country=CC | Starting country code | US |
--exclude-countries=CC,CC | Exclude countries (comma-separated codes) | - |
--include-countries=CC,CC | Include only listed countries (comma-separated codes; ZZ = unknown). Mutually exclusive with --exclude-countries | - |
--protocol=PROTO | Test only specified protocol (http/https) | - |
--max-mirrors-to-output=N | Maximum mirrors to output | - |
--disable-comments | Disable printing comments | false |
--disable-untested-fallback | Exit with error when all speed tests fail instead of outputting untested mirrors | false |
--allow-root | Allow running as root | false |
| Option | Description | Default |
|---|---|---|
--completion=N | Minimum sync completion (0.0-1.0) | 1.0 |
--sort-mirrors-by=MODE | Sort by: score_asc, score_desc, delay_asc, delay_desc | score_asc |
The tool uses:
Data attribution: Submarine cable and IX data from TeleGeography.
alias ua-drop-caches='sudo paccache -rk3; yay -Sc --aur --noconfirm'
alias ua-update-all='export TMPFILE="$(mktemp)"; \
sudo true; \
rate-mirrors --save=$TMPFILE arch --max-delay=21600 \
&& sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist-backup \
&& sudo mv $TMPFILE /etc/pacman.d/mirrorlist \
&& ua-drop-caches \
&& yay -Syyu --noconfirm'
Notes:
sudo true prompts for password at the startpaccache is from pacman-contribyay is an AUR helperAdd to ~/.bashrc or ~/.zshrc, then run ua-update-all.
# STARTED AT: 2025-08-31 14:04:21.217766 +03:00
# ARGS: rate-mirrors arch
# FETCHED MIRRORS: 1147
# MIRRORS LEFT AFTER FILTERING: 730
# JUMP #1
# EXPLORING US
# + NEIGHBOR UK (by HubsFirst)
# + NEIGHBOR DE (by DistanceFirst)
# [DE] SpeedTestResult { speed: 29.0 MB/s; elapsed: 1.00s; connection_time: 79ms }
# ...
# RE-TESTING TOP MIRRORS
# [SE] SpeedTestResult { speed: 64.6 MB/s; elapsed: 745ms; connection_time: 122ms }
# [BY] SpeedTestResult { speed: 61.2 MB/s; elapsed: 786ms; connection_time: 16ms }
# ==== RESULTS (top re-tested) ====
# 1. [SE] 64.6 MB/s -> https://mirror.osbeck.com/archlinux/
# 2. [BY] 61.2 MB/s -> http://mirror.datacenter.by/pub/archlinux/
# 3. [LT] 54.1 MB/s -> http://mirrors.atviras.lt/archlinux/
# FINISHED AT: 2025-08-31 14:04:40.296066 +03:00
Server = https://mirror.osbeck.com/archlinux/$repo/os/$arch
Server = http://mirror.datacenter.by/pub/archlinux/$repo/os/$arch
Server = http://mirrors.atviras.lt/archlinux/$repo/os/$arch
For custom mirror lists or unsupported distributions:
# Input format (tab-separated):
# URL
# COUNTRY<tab>URL
# URL<tab>COUNTRY
cat mirrors.txt | rate-mirrors --concurrency=40 stdin \
--path-to-test="extra/os/x86_64/extra.files" \
--path-to-return='$repo/os/$arch' \
--comment-prefix="# " \
--output-prefix="Server = "
Example mirrors.txt:
https://mirror-a.example.org/repo/
US https://mirror-b.example.org/repo/
https://mirror-c.example.org/repo/ DE
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error (network failure, invalid arguments, etc.) |
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
Previously known as "Rate Arch Mirrors" (changed in v0.4.0). View old README