Skip to content

Replace reflector #33

@kousu

Description

@kousu

According to #archlinux reflector is dying; possible replacements are

rate-mirrors has the big advantage of being able to quickly find zero in on the fastest mirrors globally by spidering through
fastest countries, though always starting from the US; that means no need to pin to guess a country here:

# detect our current country
# use mirrors from there
IP=$(timeout 30 curl -s ipinfo.io | jq -r .ip | head -n1)
COUNTRY=$(timeout 30 whois -H --no-recursion "$IP" | grep Country | head -n 1 | cut -f 2 -d : | tr -d '[:space:]')
if [ -z "$COUNTRY" ]; then
# default if failed
COUNTRY="CA"
fi
export COUNTRY
sh "$1" > "$2"

cat <<EOF
--save /etc/pacman.d/mirrorlist
--protocol https
--fastest 3
--country ${COUNTRY}
EOF

Both of these have the big disadvantage (for how I've designed things) of being AUR packages.

reflector is part of the official arch installer so like, it's probably not that urgent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions