/etc/xdg/reflector/reflector.conf ---------------------------------------------------------- --save /etc/pacman.d/mirrorlist --country China --protocol https --latest 5
照猫画虎
有了这些基本的功能,我们能否再做出一些小改进呢?
查看reflector的help message:
1
$ reflector help
这里的help message比较长,就不全放出来了,其中有几个我觉得比较有意思的:
1 2 3 4 5 6
--sort {age,rate,country,score,delay} Sort the mirrorlist. "age": last server synchronization; "rate": download rate; "country": country name, either alphabetically or in the order given by the --country option; "score": MirrorStatus score; "delay": MirrorStatus delay.
1 2 3 4 5 6
-i, --include <regex> Include servers that match <regex>, where <regex> is a Python regular express. -x, --exclude <regex> Exclude servers that match <regex>, where <regex> is a Python regular express.
# Reflector configuration file for the systemd service. # # Empty lines and lines beginning with "#" are ignored. All other lines should # contain valid reflector command-line arguments. The lines are parsed with # Python's shlex modules so standard shell syntax should work. All arguments are # collected into a single argument list. # # See "reflector --help" for details.
# Recommended Options
# Set the output path where the mirrorlist will be saved (--save). --save /etc/pacman.d/mirrorlist
# Select the transfer protocol (--protocol). --protocol https
# Select the country (--country). # Consult the list of available countries with "reflector --list-countries" and # select the countries nearest to you or the ones that you trust. For example: --country China
# Use only the most recently synchronized mirrors (--latest). --latest 5
# Sort the mirrors by synchronization time (--sort). --sort score
# Include a custom re # --include edu.cn # Exclude a custom re --exclude nju.edu.cn
################################################################################ ############## Arch Linux mirrorlist generated manually by Harry ############### ################################################################################
################################################################################ ################# Arch Linux mirrorlist generated by Reflector ################# ################################################################################
# With: reflector @/etc/xdg/reflector/reflector.conf # When: 2025-09-24 10:40:33 UTC # From: https://archlinux.org/mirrors/status/json/ # Retrieved: 2025-09-24 10:38:21 UTC # Last Check: 2025-09-24 10:16:40 UTC
Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch Server = https://mirrors.jlu.edu.cn/archlinux/$repo/os/$arch Server = https://mirrors.xjtu.edu.cn/archlinux/$repo/os/$arch Server = https://mirrors.neusoft.edu.cn/archlinux/$repo/os/$arch