diff --git a/README.md b/README.md index 4d53ee2..a261b9b 100644 --- a/README.md +++ b/README.md @@ -1,256 +1,320 @@ -## Arch Linux CN Community repo mirrors list +# Arch Linux CN Community Repository Mirrors -Here is a list of public mirrors of our [community repository](https://github.com/archlinuxcn/repo). +Here is a list of public mirrors of [our community repository](https://github.com/archlinuxcn/repo). -If you interested in making a mirror of our repository, please open an issue or pull request (or contact us at repo@archlinuxcn.org and hope the mail reaches). +## Usage + +Simply install the `archlinuxcn-mirrorlist` package. + +To help you choose the best mirror, you can view the [list of mirrors](https://archlinuxcn.org/mirrors/list.html), the [map of mirrors](https://archlinuxcn.org/mirrors/map.html) and the [synchronization status of mirrors](https://build.archlinuxcn.org/grafana/d/iK2vLpGGk/mirrors). + +### Debuginfod Configuration + +```bash +cp -v archlinuxcn.urls /etc/debuginfod/ +``` + +## Apply Mirror + +If you are interested in applying mirror of our repository, please refer to the [application.md](application.md) for instructions. + +## Mirrors + +### Our main server ```ini -## Our main server (Amsterdam, the Netherlands) (ipv4, ipv6, http, https) +## Our main server (Amsterdam, North Holland, Netherlands) (http, https, ipv4, ipv6) [archlinuxcn] Server = https://repo.archlinuxcn.org/$arch ``` +### 校园网联合镜像站 + ```ini -## CERNET (中国) (ipv4, ipv6, http, https) -## Added: 2023-08-19 -## This will redirect you to the nearest China educational mirror site. However, please note that some sites may not support IPv6. +## 校园网联合镜像站 (中国) (ipv4, ipv6) +## Redirect to suitable educational mirror based on location [archlinuxcn] Server = https://mirrors.cernet.edu.cn/archlinuxcn/$arch ``` +### 中国科学技术大学 + +```ini +## 中国科学技术大学 (安徽合肥) (http, https, ipv4, ipv6) +## It is under high load and not recommended for use +[archlinuxcn] +Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch +``` + +### 北京外国语大学 + ```ini -## 北京外国语大学 (北京) (ipv4, ipv6, http, https) -## Added: 2020-05-18 +## 北京外国语大学 (北京) (http, https, ipv4, ipv6) [archlinuxcn] Server = https://mirrors.bfsu.edu.cn/archlinuxcn/$arch ``` +### 北京交通大学 + ```ini -## 北京大学 (北京) (ipv4, ipv6, http, https) -## Added: 2023-02-26 +## 北京交通大学 (北京) (https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.pku.edu.cn/archlinuxcn/$arch +Server = https://mirror.bjtu.edu.cn/archlinuxcn/$arch ``` +### 北京邮电大学 + ```ini -## 腾讯云 (Global CDN) (ipv4, http, https) -## Added: 2018-11-23 +## 北京邮电大学 (北京) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.cloud.tencent.com/archlinuxcn/$arch +Server = https://mirrors.bupt.edu.cn/archlinuxcn/$arch ``` +### 中国科学院软件研究所 + ```ini -## 网易 (China CDN) (ipv4, http, https) +## 中国科学院软件研究所 (北京) (https, ipv4) [archlinuxcn] -Server = https://mirrors.163.com/archlinux-cn/$arch +Server = https://mirror.iscas.ac.cn/archlinuxcn/$arch ``` +### 北京大学 + ```ini -## 阿里云 (Global CDN) (ipv4, ipv6, http, https) -## Added: 2020-07-03 +## 北京大学 (北京) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.aliyun.com/archlinuxcn/$arch +Server = https://mirrors.pku.edu.cn/archlinuxcn/$arch ``` +### 清华大学 + ```ini -## 清华大学 (北京) (ipv4, ipv6, http, https) +## 清华大学 (北京) (http, https, ipv4, ipv6) +## It is under high load and not recommended for use [archlinuxcn] Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch ``` +### 重庆大学 + ```ini -## 中国科学技术大学 (安徽合肥) (ipv4, ipv6, http, https) +## 重庆大学 (重庆) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch +Server = https://mirrors.cqu.edu.cn/archlinuxcn/$arch ``` +### 重庆邮电大学 + ```ini -## 哈尔滨工业大学 (黑龙江哈尔滨) (ipv4, ipv6, http, https) -## Added: 2021-01-09 +## 重庆邮电大学 (重庆) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.hit.edu.cn/archlinuxcn/$arch +Server = https://mirrors.cqupt.edu.cn/archlinuxcn/$arch ``` +### 兰州大学 + ```ini -## 吉林大学 (吉林长春) (ipv4, ipv6, http, https) -## Added: 2023-04-21 +## 兰州大学 (甘肃兰州) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.jlu.edu.cn/archlinuxcn/$arch +Server = https://mirrors.lzu.edu.cn/archlinuxcn/$arch ``` +### 南方科技大学 + ```ini -## 浙江大学 (浙江杭州) (ipv4, ipv6, http, https) -## Added: 2017-06-05 +## 南方科技大学 (广东深圳) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.zju.edu.cn/archlinuxcn/$arch +Server = https://mirrors.sustech.edu.cn/archlinuxcn/$arch ``` +### 哈尔滨工业大学 + ```ini -## 重庆大学 (重庆) (ipv4, ipv6, http, https) +## 哈尔滨工业大学 (黑龙江哈尔滨) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.cqu.edu.cn/archlinuxcn/$arch +Server = https://mirrors.hit.edu.cn/archlinuxcn/$arch ``` +### 南阳理工学院 + ```ini -## SJTUG 软件源镜像服务 (上海) (ipv4, ipv6, https) -## Added: 2018-05-21 +## 南阳理工学院 (河南南阳) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirror.sjtu.edu.cn/archlinux-cn/$arch +Server = https://mirror.nyist.edu.cn/archlinuxcn/$arch ``` +### 荆楚理工学院 + ```ini -## 南京大学 (江苏南京) (ipv4, ipv6, http, https) +## 荆楚理工学院 (湖北荆门) (https, ipv4) [archlinuxcn] -Server = https://mirrors.nju.edu.cn/archlinuxcn/$arch +Server = https://mirrors.jcut.edu.cn/archlinuxcn/$arch ``` +### 武昌首义学院 + ```ini -## 南方科技大学 (广东深圳) (ipv4, ipv6, http, https) -## Added: 2021-08-17 +## 武昌首义学院 (湖北武汉) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.sustech.edu.cn/archlinuxcn/$arch +Server = https://mirrors.wsyu.edu.cn/archlinuxcn/$arch ``` +### 南京工业大学 + ```ini -## 武昌首义学院 (湖北武汉) (ipv4, ipv6, http, https) -## Added: 2023-04-07 +## 南京工业大学 (江苏南京) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.wsyu.edu.cn/archlinuxcn/$arch +Server = https://mirrors.njtech.edu.cn/archlinuxcn/$arch ``` +### 南京大学 + ```ini -## 北京交通大学 (北京) (ipv4, ipv6, https) -## Added: 2023-08-19 +## 南京大学 (江苏南京) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirror.bjtu.edu.cn/archlinuxcn/$arch +Server = https://mirrors.nju.edu.cn/archlinuxcn/$arch ``` +### 吉林大学 + ```ini -## 兰州大学 (甘肃兰州) (ipv4, ipv6, http, https) -## Added: 2023-08-19 +## 吉林大学 (吉林长春) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirror.lzu.edu.cn/archlinuxcn/$arch +Server = https://mirrors.jlu.edu.cn/archlinuxcn/$arch ``` +### 沈阳航空航天大学 + ```ini -## 西安交通大学 (陕西西安) (ipv4, ipv6, http, https) -## Added: 2023-08-19 +## 沈阳航空航天大学 (辽宁沈阳) (https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.xjtu.edu.cn/archlinuxcn/$arch +Server = https://mirrors.sau.edu.cn/archlinuxcn/$arch ``` +### 西安交通大学 + ```ini -## 南阳理工学院 (河南南阳) (ipv4, ipv6, http, https) -## Added: 2023-08-19 +## 西安交通大学 (陕西西安) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirror.nyist.edu.cn/archlinuxcn/$arch +Server = https://mirrors.xjtu.edu.cn/archlinuxcn/$arch ``` +### 上海交通大学 + ```ini -## 南京工业大学 (江苏南京) (ipv4, ipv6, http, https) -## Added: 2023-08-19 +## 上海交通大学 (上海) (https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.njtech.edu.cn/archlinuxcn/$arch +Server = https://mirror.sjtu.edu.cn/archlinux-cn/$arch ``` +### 上海科技大学 + ```ini -## 上海科技大学 (上海) (ipv4, https) -## Added: 2023-08-19 +## 上海科技大学 (上海) (https, ipv4) [archlinuxcn] Server = https://mirrors.shanghaitech.edu.cn/archlinuxcn/$arch ``` +### 浙江大学 + ```ini -## 中国科学院软件研究所 (北京) (ipv4, https) -## Added: 2023-08-19 +## 浙江大学 (浙江杭州) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirror.iscas.ac.cn/archlinuxcn/$arch +Server = https://mirrors.zju.edu.cn/archlinuxcn/$arch ``` +### 网易 + ```ini -## 北京邮电大学 (北京) (ipv4, ipv6, http, https) -## Added: 2023-09-15 +## 网易 (浙江杭州) (http, https, ipv4) [archlinuxcn] -Server = https://mirrors.bupt.edu.cn/archlinuxcn/$arch +Server = https://mirrors.163.com/archlinux-cn/$arch ``` +### 阿里云 + ```ini -## NCKU CCNS (Taiwan) (ipv4, http, https) -## Added: 2021-06-30 -## Resources provided by NCKU CSIE +## 阿里云 (Global CDN) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://archlinux.ccns.ncku.edu.tw/archlinuxcn/$arch +Server = https://mirrors.aliyun.com/archlinuxcn/$arch ``` +### 腾讯云 + ```ini -## xTom (Hong Kong server) (Hong Kong) (ipv4, ipv6, http, https) -## Added: 2017-09-18 -## Blocking users in mainland China +## 腾讯云 (Global CDN) (http, https, ipv4) [archlinuxcn] -Server = https://mirrors.xtom.hk/archlinuxcn/$arch +Server = https://mirrors.cloud.tencent.com/archlinuxcn/$arch ``` +### xTom (香港伺服器) + ```ini -## xTom (US server) (San Jose, CA, United States) (ipv4, ipv6, http, https) -## Added: 2019-02-19 -## Blocking users in mainland China +## xTom (香港伺服器) (香港) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.xtom.us/archlinuxcn/$arch +Server = https://mirrors.xtom.hk/archlinuxcn/$arch ``` +### 國立成功大學 + ```ini -## xTom (Netherlands server) (Amsterdam, the Netherlands) (ipv4, ipv6, http, https) -## Added: 2019-09-07 -## Blocking users in mainland China +## 國立成功大學 (臺灣臺南) (http, https, ipv4) [archlinuxcn] -Server = https://mirrors.xtom.nl/archlinuxcn/$arch +Server = https://archlinux.ccns.ncku.edu.tw/archlinuxcn/$arch ``` +### xTom (Australia server) + ```ini -## xTom (Germany server) (Duesseldorf, Germany) (ipv4, ipv6, http, https) -## Added: 2021-05-07 -## Blocking users in mainland China +## xTom (Australia server) (Sydney, New South Wales, Australia) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.xtom.de/archlinuxcn/$arch +Server = https://mirrors.xtom.au/archlinuxcn/$arch ``` +### xTom (Estonia server) + ```ini -## xTom (Estonia server) (Tallinn, Estonia) (ipv4, ipv6, http, https) -## Added: 2021-05-27 -## Blocking users in mainland China +## xTom (Estonia server) (Tallinn, Harju, Estonia) (http, https, ipv4, ipv6) [archlinuxcn] Server = https://mirrors.xtom.ee/archlinuxcn/$arch ``` +### xTom (Germany server) + ```ini -## xTom (Japan server) (Osaka, Japan) (ipv4, ipv6, http, https) -## Added: 2022-01-17 -## Blocking users in mainland China +## xTom (Germany server) (Düsseldorf, North Rhine-Westphalia, Germany) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.xtom.jp/archlinuxcn/$arch +Server = https://mirrors.xtom.de/archlinuxcn/$arch ``` +### xTom (Japan server) + ```ini -## xTom (Australia server) (Sydney, Australia) (ipv4, ipv6, http, https) -## Added: 2022-07-03 -## Blocking users in mainland China +## xTom (Japan server) (Osaka, Japan) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.xtom.au/archlinuxcn/$arch +Server = https://mirrors.xtom.jp/archlinuxcn/$arch ``` +### xTom (Netherlands server) + ```ini -## Open Computing Facility, UC Berkeley (Berkeley, CA, United States) (ipv4, ipv6, http, https) -## Added: 2019-02-19 +## xTom (Netherlands server) (Amsterdam, North Holland, Netherlands) (http, https, ipv4, ipv6) [archlinuxcn] -Server = https://mirrors.ocf.berkeley.edu/archlinuxcn/$arch +Server = https://mirrors.xtom.nl/archlinuxcn/$arch ``` +### University of California, Berkeley -## Arch Linux CN Community repo debuginfod configuration +```ini +## University of California, Berkeley (Berkeley, California, United States) (http, https, ipv4, ipv6) +[archlinuxcn] +Server = https://mirrors.ocf.berkeley.edu/archlinuxcn/$arch +``` -(This is included in our `archlinuxcn-mirrorlist-git` package.) +### xTom (United States server) -```bash -cp -v archlinuxcn.urls /etc/debuginfod/ +```ini +## xTom (United States server) (San Jose, California, United States) (http, https, ipv4, ipv6) +[archlinuxcn] +Server = https://mirrors.xtom.us/archlinuxcn/$arch ``` - diff --git a/application.md b/application.md index 920e167..873febf 100644 --- a/application.md +++ b/application.md @@ -1,16 +1,21 @@ -我们欢迎有能力的组织和个人镜像我们的软件仓库。以下是推荐的申请流程: +# How to Apply Mirror of Arch Linux CN Repository -1. 在本仓库开一个 pr,说明相关情况,并在 mirrors.yaml 文件中添加预计建立镜像的相关信息。同时在 pr 中提供一个邮件地址。 -2. 等待含有 rsync 用户名和密码的邮件。 -3. 等镜像初始化完成之后,pr 将被合并。 +We welcome capable organizations and individuals to apply mirror of our software repository. This can improve the performance and reliability of our software distribution, and also provide a better service for the users in your region. To apply, please follow these steps: -推荐的同步命令: +1. Clone this repository and edit [mirrors.yaml](mirrors.yaml) with your mirror information. By following the directive `python manager.py all`, the protocols and coordinates fields will be automatically populated, and README.md, archlinuxcn-mirrorlist, and mirrors.geojson files will be generated. -```sh -RSYNC_PASSWORD=<你的rsync密码> rsync -rtlivH --delete-after --delay-updates --safe-links --max-delete=1000 --contimeout=60 <你的rsync用户名>@sync.repo.archlinuxcn.org::repo . -``` +2. Create a pull request with your changes and describe your situation. Please provide an email address for contact. -关于同步频率:我们的打包机器人 lilac 每天 (Asia/Shanghai, UTC+8) 4、12、20 点多会开始打包,因此建议同步频率6、7小时一次,尽量避开 lilac 打包的时间段。 +3. Wait for our email with the rsync username and password. Use the following command to synchronize your mirror with our main server: -你也可以发送邮件到 repo 位于 archlinuxcn.org 来申请。 + ```bash + RSYNC_PASSWORD= rsync --recursive --times --links --hard-links --safe-links --max-delete=1000 --delete-after --delay-updates --itemize-changes --verbose --contimeout=60 @sync.repo.archlinuxcn.org::repo . + ``` +4. Once your mirror has been initialized, we will merge your pull request and include your mirror in our mirrorlist. + +5. We recommend synchronizing every 6 or 7 hours, and avoiding the time when our automatic packaging system, [lilac](https://github.com/archlinuxcn/lilac), is working at 4, 12 and 20 (Asia/Shanghai, UTC+8) every day. This can prevent potential conflicts and errors during the synchronization process. + +Alternatively, you can email to apply for mirror. We will reply as soon as possible. + +Thank you for your support and contribution! diff --git a/archlinuxcn-mirrorlist b/archlinuxcn-mirrorlist index 07c35c1..2220b52 100644 --- a/archlinuxcn-mirrorlist +++ b/archlinuxcn-mirrorlist @@ -1,106 +1,118 @@ ## -## Arch Linux CN community repository mirrorlist -## Generated on 2023-08-25 +## Arch Linux CN Community Repository mirrorlist +## Generated on 2023-12-16 ## -## Our main server (Amsterdam, the Netherlands) (ipv4, ipv6, http, https) +## Our main server (Amsterdam, North Holland, Netherlands) (http, https, ipv4, ipv6) # Server = https://repo.archlinuxcn.org/$arch -## CERNET (中国) (ipv4, ipv6, http, https) +## 校园网联合镜像站 (中国) (ipv4, ipv6) +## Redirect to suitable educational mirror based on location # Server = https://mirrors.cernet.edu.cn/archlinuxcn/$arch -## 北京外国语大学 (北京) (ipv4, ipv6, http, https) +## 中国科学技术大学 (安徽合肥) (http, https, ipv4, ipv6) +## It is under high load and not recommended for use +# Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch + +## 北京外国语大学 (北京) (http, https, ipv4, ipv6) # Server = https://mirrors.bfsu.edu.cn/archlinuxcn/$arch -## 北京大学 (北京) (ipv4, ipv6, http, https) -# Server = https://mirrors.pku.edu.cn/archlinuxcn/$arch +## 北京交通大学 (北京) (https, ipv4, ipv6) +# Server = https://mirror.bjtu.edu.cn/archlinuxcn/$arch -## 腾讯云 (Global CDN) (ipv4, http, https) -# Server = https://mirrors.cloud.tencent.com/archlinuxcn/$arch +## 北京邮电大学 (北京) (http, https, ipv4, ipv6) +# Server = https://mirrors.bupt.edu.cn/archlinuxcn/$arch -## 网易 (China CDN) (ipv4, http, https) -# Server = https://mirrors.163.com/archlinux-cn/$arch +## 中国科学院软件研究所 (北京) (https, ipv4) +# Server = https://mirror.iscas.ac.cn/archlinuxcn/$arch -## 阿里云 (Global CDN) (ipv4, ipv6, http, https) -# Server = https://mirrors.aliyun.com/archlinuxcn/$arch +## 北京大学 (北京) (http, https, ipv4, ipv6) +# Server = https://mirrors.pku.edu.cn/archlinuxcn/$arch -## 清华大学 (北京) (ipv4, ipv6, http, https) +## 清华大学 (北京) (http, https, ipv4, ipv6) +## It is under high load and not recommended for use # Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch -## 中国科学技术大学 (安徽合肥) (ipv4, ipv6, http, https) -# Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch +## 重庆大学 (重庆) (http, https, ipv4, ipv6) +# Server = https://mirrors.cqu.edu.cn/archlinuxcn/$arch -## 哈尔滨工业大学 (黑龙江哈尔滨) (ipv4, ipv6, http, https) -# Server = https://mirrors.hit.edu.cn/archlinuxcn/$arch +## 重庆邮电大学 (重庆) (http, https, ipv4, ipv6) +# Server = https://mirrors.cqupt.edu.cn/archlinuxcn/$arch -## 吉林大学 (吉林长春) (ipv4, ipv6, http, https) -# Server = https://mirrors.jlu.edu.cn/archlinuxcn/$arch +## 兰州大学 (甘肃兰州) (http, https, ipv4, ipv6) +# Server = https://mirrors.lzu.edu.cn/archlinuxcn/$arch -## 浙江大学 (浙江杭州) (ipv4, ipv6, http, https) -# Server = https://mirrors.zju.edu.cn/archlinuxcn/$arch - -## 重庆大学 (重庆) (ipv4, ipv6, http, https) -# Server = https://mirrors.cqu.edu.cn/archlinuxcn/$arch +## 南方科技大学 (广东深圳) (http, https, ipv4, ipv6) +# Server = https://mirrors.sustech.edu.cn/archlinuxcn/$arch -## SJTUG 软件源镜像服务 (上海) (ipv4, ipv6, https) -# Server = https://mirror.sjtu.edu.cn/archlinux-cn/$arch +## 哈尔滨工业大学 (黑龙江哈尔滨) (http, https, ipv4, ipv6) +# Server = https://mirrors.hit.edu.cn/archlinuxcn/$arch -## 南京大学 (江苏南京) (ipv4, ipv6, http, https) -# Server = https://mirrors.nju.edu.cn/archlinuxcn/$arch +## 南阳理工学院 (河南南阳) (http, https, ipv4, ipv6) +# Server = https://mirror.nyist.edu.cn/archlinuxcn/$arch -## 南方科技大学 (广东深圳) (ipv4, ipv6, http, https) -# Server = https://mirrors.sustech.edu.cn/archlinuxcn/$arch +## 荆楚理工学院 (湖北荆门) (https, ipv4) +# Server = https://mirrors.jcut.edu.cn/archlinuxcn/$arch -## 武昌首义学院 (湖北武汉) (ipv4, ipv6, http, https) +## 武昌首义学院 (湖北武汉) (http, https, ipv4, ipv6) # Server = https://mirrors.wsyu.edu.cn/archlinuxcn/$arch -## 北京交通大学 (北京) (ipv4, ipv6, https) -# Server = https://mirror.bjtu.edu.cn/archlinuxcn/$arch +## 南京工业大学 (江苏南京) (http, https, ipv4, ipv6) +# Server = https://mirrors.njtech.edu.cn/archlinuxcn/$arch -## 兰州大学 (甘肃兰州) (ipv4, ipv6, http, https) -# Server = https://mirror.lzu.edu.cn/archlinuxcn/$arch +## 南京大学 (江苏南京) (http, https, ipv4, ipv6) +# Server = https://mirrors.nju.edu.cn/archlinuxcn/$arch -## 西安交通大学 (陕西西安) (ipv4, ipv6, http, https) -# Server = https://mirrors.xjtu.edu.cn/archlinuxcn/$arch +## 吉林大学 (吉林长春) (http, https, ipv4, ipv6) +# Server = https://mirrors.jlu.edu.cn/archlinuxcn/$arch -## 南阳理工学院 (河南南阳) (ipv4, ipv6, http, https) -# Server = https://mirror.nyist.edu.cn/archlinuxcn/$arch +## 沈阳航空航天大学 (辽宁沈阳) (https, ipv4, ipv6) +# Server = https://mirrors.sau.edu.cn/archlinuxcn/$arch -## 南京工业大学 (江苏南京) (ipv4, ipv6, http, https) -# Server = https://mirrors.njtech.edu.cn/archlinuxcn/$arch +## 西安交通大学 (陕西西安) (http, https, ipv4, ipv6) +# Server = https://mirrors.xjtu.edu.cn/archlinuxcn/$arch -## 上海科技大学 (上海) (ipv4, https) +## 上海交通大学 (上海) (https, ipv4, ipv6) +# Server = https://mirror.sjtu.edu.cn/archlinux-cn/$arch + +## 上海科技大学 (上海) (https, ipv4) # Server = https://mirrors.shanghaitech.edu.cn/archlinuxcn/$arch -## 中国科学院软件研究所 (北京) (ipv4, https) -# Server = https://mirror.iscas.ac.cn/archlinuxcn/$arch +## 浙江大学 (浙江杭州) (http, https, ipv4, ipv6) +# Server = https://mirrors.zju.edu.cn/archlinuxcn/$arch -## 北京邮电大学 (北京) (ipv4, ipv6, http, https) -# Server = https://mirrors.bupt.edu.cn/archlinuxcn/$arch +## 网易 (浙江杭州) (http, https, ipv4) +# Server = https://mirrors.163.com/archlinux-cn/$arch -## NCKU CCNS (Taiwan) (ipv4, http, https) -# Server = https://archlinux.ccns.ncku.edu.tw/archlinuxcn/$arch +## 阿里云 (Global CDN) (http, https, ipv4, ipv6) +# Server = https://mirrors.aliyun.com/archlinuxcn/$arch -## xTom (Hong Kong server) (Hong Kong) (ipv4, ipv6, http, https) -# Server = https://mirrors.xtom.hk/archlinuxcn/$arch +## 腾讯云 (Global CDN) (http, https, ipv4) +# Server = https://mirrors.cloud.tencent.com/archlinuxcn/$arch -## xTom (US server) (San Jose, CA, United States) (ipv4, ipv6, http, https) -# Server = https://mirrors.xtom.us/archlinuxcn/$arch +## xTom (香港伺服器) (香港) (http, https, ipv4, ipv6) +# Server = https://mirrors.xtom.hk/archlinuxcn/$arch -## xTom (Netherlands server) (Amsterdam, the Netherlands) (ipv4, ipv6, http, https) -# Server = https://mirrors.xtom.nl/archlinuxcn/$arch +## 國立成功大學 (臺灣臺南) (http, https, ipv4) +# Server = https://archlinux.ccns.ncku.edu.tw/archlinuxcn/$arch -## xTom (Germany server) (Duesseldorf, Germany) (ipv4, ipv6, http, https) -# Server = https://mirrors.xtom.de/archlinuxcn/$arch +## xTom (Australia server) (Sydney, New South Wales, Australia) (http, https, ipv4, ipv6) +# Server = https://mirrors.xtom.au/archlinuxcn/$arch -## xTom (Estonia server) (Tallinn, Estonia) (ipv4, ipv6, http, https) +## xTom (Estonia server) (Tallinn, Harju, Estonia) (http, https, ipv4, ipv6) # Server = https://mirrors.xtom.ee/archlinuxcn/$arch -## xTom (Japan server) (Osaka, Japan) (ipv4, ipv6, http, https) +## xTom (Germany server) (Düsseldorf, North Rhine-Westphalia, Germany) (http, https, ipv4, ipv6) +# Server = https://mirrors.xtom.de/archlinuxcn/$arch + +## xTom (Japan server) (Osaka, Japan) (http, https, ipv4, ipv6) # Server = https://mirrors.xtom.jp/archlinuxcn/$arch -## xTom (Australia server) (Sydney, Australia) (ipv4, ipv6, http, https) -# Server = https://mirrors.xtom.au/archlinuxcn/$arch +## xTom (Netherlands server) (Amsterdam, North Holland, Netherlands) (http, https, ipv4, ipv6) +# Server = https://mirrors.xtom.nl/archlinuxcn/$arch -## Open Computing Facility, UC Berkeley (Berkeley, CA, United States) (ipv4, ipv6, http, https) +## University of California, Berkeley (Berkeley, California, United States) (http, https, ipv4, ipv6) # Server = https://mirrors.ocf.berkeley.edu/archlinuxcn/$arch + +## xTom (United States server) (San Jose, California, United States) (http, https, ipv4, ipv6) +# Server = https://mirrors.xtom.us/archlinuxcn/$arch diff --git a/check-lastupdate b/check-lastupdate deleted file mode 100755 index 382ef41..0000000 --- a/check-lastupdate +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/python3 - -import asyncio -from urllib.parse import urljoin - -import yaml -import aiohttp - -def humantime(t: int) -> str: - '''seconds -> XhYmZs''' - m, s = divmod(t, 60) - h, m = divmod(m, 60) - d, h = divmod(h, 24) - ret = '' - if d: - ret += '%dd' % d - if h: - ret += '%dh' % h - if m: - ret += '%dm' % m - if s: - ret += '%ds' % s - if not ret: - ret = '0s' - return ret - -async def get_lastupdate(session, name, url): - try: - res = await session.get(url) - content = await res.text() - dt = int(content) - print(f'{name} done.') - return name, dt - except Exception as e: - return name, e - -async def main(): - with open('mirrors.yaml') as f: - data = yaml.load(f, Loader=yaml.FullLoader) - - async with aiohttp.ClientSession( - timeout = aiohttp.ClientTimeout(total=10), - ) as session: - futures = [] - for mirror in data: - url = urljoin(mirror['url'], 'lastupdate') - fu = get_lastupdate(session, mirror['provider'], url) - futures.append(fu) - fu = get_lastupdate(session, 'tier0', 'https://repo.archlinuxcn.org/lastupdate') - futures.append(fu) - results = await asyncio.gather(*futures) - - done = {} - error = {} - for name, dt in results: - if isinstance(dt, int): - done[name] = dt - else: - error[name] = dt - - print('\nLags:') - tier0 = done.pop('tier0') - for name, dt in sorted(done.items(), reverse=True, key=lambda x: x[1]): - print(f'{name} {humantime(tier0-dt)}') - - print('\nErrors:') - for name, e in error.items(): - print(f'{name} {e!r}') - -if __name__ == '__main__': - asyncio.run(main()) diff --git a/geolocs.json b/geolocs.json deleted file mode 100644 index 962fff5..0000000 --- a/geolocs.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"mirror":"Our main server","url":"https://repo.archlinuxcn.org/","name":"Amsterdam, North Holland, Netherlands"},"geometry":{"type":"Point","coordinates":[4.8936041,52.3727598]}},{"type":"Feature","properties":{"mirror":"北京外国语大学","url":"https://mirrors.bfsu.edu.cn/archlinuxcn/","name":"Beijing, China"},"geometry":{"type":"Point","coordinates":[116.3912757,39.906217]}},{"type":"Feature","properties":{"mirror":"北京大学","url":"https://mirrors.pku.edu.cn/archlinuxcn/","name":"Beijing, China"},"geometry":{"type":"Point","coordinates":[116.3912757,39.906217]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Amsterdam, North Holland, Netherlands"},"geometry":{"type":"Point","coordinates":[4.8936041,52.3727598]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Atlanta, Georgia, United States"},"geometry":{"type":"Point","coordinates":[-84.3902644,33.7489924]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Bengbu, Anhui, China"},"geometry":{"type":"Point","coordinates":[117.3825673,32.9176422]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Changsha, Hunan, China"},"geometry":{"type":"Point","coordinates":[112.9335861,28.2302056]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Changzhou, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[119.9691539,31.8122623]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Chennai, Tamil Nadu, India"},"geometry":{"type":"Point","coordinates":[80.270186,13.0836939]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Foshan, Guangdong, China"},"geometry":{"type":"Point","coordinates":[112.99801241836545,23.1102636]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Frankfurt, Hesse, Germany"},"geometry":{"type":"Point","coordinates":[8.6820917,50.1106444]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Fujairah, Emirate of Fujairah, United Arab Emirates"},"geometry":{"type":"Point","coordinates":[56.33403414986288,25.1212273]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Fuzhou, Fujian, China"},"geometry":{"type":"Point","coordinates":[119.17376067528227,25.937271600000003]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Guangzhou, Guangdong, China"},"geometry":{"type":"Point","coordinates":[113.2592945,23.1301964]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Guiyang, Guizhou, China"},"geometry":{"type":"Point","coordinates":[106.6246178,26.6499922]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Hong Kong"},"geometry":{"type":"Point","coordinates":[114.1628131,22.2793278]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Huizhou, Guangdong, China"},"geometry":{"type":"Point","coordinates":[114.4107202,23.1146515]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Hunan, China"},"geometry":{"type":"Point","coordinates":[111.7487063,27.6662087]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Jinan, Shandong, China"},"geometry":{"type":"Point","coordinates":[117.1140042,36.6507007]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Jiujiang, Jiangxi, China"},"geometry":{"type":"Point","coordinates":[115.9474861,29.6653828]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Kunming, Yunnan, China"},"geometry":{"type":"Point","coordinates":[102.8324209,24.8843019]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"London, United Kingdom"},"geometry":{"type":"Point","coordinates":[-0.1276474,51.5073219]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Los Angeles, California, United States"},"geometry":{"type":"Point","coordinates":[-118.242766,34.0536909]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Manila, Metro Manila, Philippines"},"geometry":{"type":"Point","coordinates":[120.9809674,14.5907332]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Melbourne, Victoria, Australia"},"geometry":{"type":"Point","coordinates":[144.9631608,-37.8142176]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Mumbai, Maharashtra, India"},"geometry":{"type":"Point","coordinates":[72.8773928,19.0759899]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Nanchang, Jiangxi, China"},"geometry":{"type":"Point","coordinates":[115.8540042,28.687547]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Nanjing, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[118.7788734,32.0437711]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Nantong, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[120.8904588,31.9827896]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Ningbo, Zhejiang, China"},"geometry":{"type":"Point","coordinates":[121.6203873,29.8622194]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Osaka, Japan"},"geometry":{"type":"Point","coordinates":[135.490357,34.6198813]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Pasig, Metro Manila, Philippines"},"geometry":{"type":"Point","coordinates":[121.0812368,14.5594821]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Shanghai, China"},"geometry":{"type":"Point","coordinates":[121.4692071,31.2322758]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Shenyang, Liaoning, China"},"geometry":{"type":"Point","coordinates":[123.458674,41.6749893]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Shenzhen, Guangdong, China"},"geometry":{"type":"Point","coordinates":[114.0543297,22.555454]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Shijiazhuang, Hebei, China"},"geometry":{"type":"Point","coordinates":[114.5088385,38.0429742]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Singapore"},"geometry":{"type":"Point","coordinates":[103.8194992,1.357107]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Suzhou, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[120.5810725,31.3016935]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Taiyuan, Shanxi, China"},"geometry":{"type":"Point","coordinates":[112.5452739,37.870009]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Tangshan, Hebei, China"},"geometry":{"type":"Point","coordinates":[118.1738665,39.6295591]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Tianjin, China"},"geometry":{"type":"Point","coordinates":[117.1951073,39.0856735]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Wuhan, Hubei, China"},"geometry":{"type":"Point","coordinates":[114.2999353,30.5951051]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Wuhu, Anhui, China"},"geometry":{"type":"Point","coordinates":[118.4277477,31.3536127]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Wuxi, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[120.3074357,31.4933074]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Xiamen, Fujian, China"},"geometry":{"type":"Point","coordinates":[118.0853479,24.4801069]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Xining, Qinghai, China"},"geometry":{"type":"Point","coordinates":[101.7761976,36.617331]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Yantai, Shandong, China"},"geometry":{"type":"Point","coordinates":[121.4425255,37.461928]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Zhengzhou, Henan, China"},"geometry":{"type":"Point","coordinates":[113.6191483,34.7487244]}},{"type":"Feature","properties":{"mirror":"腾讯云","url":"https://mirrors.cloud.tencent.com/archlinuxcn/","name":"Zibo, Shandong, China"},"geometry":{"type":"Point","coordinates":[117.980675,36.819626]}},{"type":"Feature","properties":{"mirror":"网易","url":"https://mirrors.163.com/archlinux-cn/","name":"Changsha, Hunan, China"},"geometry":{"type":"Point","coordinates":[112.9335861,28.2302056]}},{"type":"Feature","properties":{"mirror":"网易","url":"https://mirrors.163.com/archlinux-cn/","name":"Dezhou, Shandong, China"},"geometry":{"type":"Point","coordinates":[116.305416,37.4486676]}},{"type":"Feature","properties":{"mirror":"网易","url":"https://mirrors.163.com/archlinux-cn/","name":"Foshan, Guangdong, China"},"geometry":{"type":"Point","coordinates":[112.99801241836545,23.1102636]}},{"type":"Feature","properties":{"mirror":"网易","url":"https://mirrors.163.com/archlinux-cn/","name":"Fuzhou, Fujian, China"},"geometry":{"type":"Point","coordinates":[119.17376067528227,25.937271600000003]}},{"type":"Feature","properties":{"mirror":"网易","url":"https://mirrors.163.com/archlinux-cn/","name":"Hangzhou, Zhejiang, China"},"geometry":{"type":"Point","coordinates":[120.2052342,30.2489634]}},{"type":"Feature","properties":{"mirror":"网易","url":"https://mirrors.163.com/archlinux-cn/","name":"Jinhua, Zhejiang, China"},"geometry":{"type":"Point","coordinates":[119.6486487,29.1080344]}},{"type":"Feature","properties":{"mirror":"网易","url":"https://mirrors.163.com/archlinux-cn/","name":"Lianyungang, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[119.215813,34.5978596]}},{"type":"Feature","properties":{"mirror":"网易","url":"https://mirrors.163.com/archlinux-cn/","name":"Maoming, Guangdong, China"},"geometry":{"type":"Point","coordinates":[110.9209511,21.6656961]}},{"type":"Feature","properties":{"mirror":"网易","url":"https://mirrors.163.com/archlinux-cn/","name":"Nantong, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[120.8904588,31.9827896]}},{"type":"Feature","properties":{"mirror":"网易","url":"https://mirrors.163.com/archlinux-cn/","name":"Quzhou, Zhejiang, China"},"geometry":{"type":"Point","coordinates":[118.8759775,28.9268429]}},{"type":"Feature","properties":{"mirror":"网易","url":"https://mirrors.163.com/archlinux-cn/","name":"Tianjin, China"},"geometry":{"type":"Point","coordinates":[117.1951073,39.0856735]}},{"type":"Feature","properties":{"mirror":"网易","url":"https://mirrors.163.com/archlinux-cn/","name":"Zhongshan, Guangdong, China"},"geometry":{"type":"Point","coordinates":[113.3656141,22.5213807]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Amsterdam, North Holland, Netherlands"},"geometry":{"type":"Point","coordinates":[4.8936041,52.3727598]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Beijing, China"},"geometry":{"type":"Point","coordinates":[116.3912757,39.906217]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Changzhou, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[119.9691539,31.8122623]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Chicago, Illinois, United States"},"geometry":{"type":"Point","coordinates":[-87.6244212,41.8755616]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Dallas, Texas, United States"},"geometry":{"type":"Point","coordinates":[-96.7968559,32.7762719]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Dongguan, Guangdong, China"},"geometry":{"type":"Point","coordinates":[113.7457788,23.0205969]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Foshan, Guangdong, China"},"geometry":{"type":"Point","coordinates":[112.99801241836545,23.1102636]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Frankfurt, Hesse, Germany"},"geometry":{"type":"Point","coordinates":[8.6820917,50.1106444]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Guangzhou, Guangdong, China"},"geometry":{"type":"Point","coordinates":[113.2592945,23.1301964]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Hohhot, Inner Mongolia, China"},"geometry":{"type":"Point","coordinates":[111.6730788,40.8337963]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Hong Kong"},"geometry":{"type":"Point","coordinates":[114.1628131,22.2793278]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Huizhou, Guangdong, China"},"geometry":{"type":"Point","coordinates":[114.4107202,23.1146515]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Kiev, Ukraine"},"geometry":{"type":"Point","coordinates":[30.5241361,50.4500336]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Langfang, Hebei, China"},"geometry":{"type":"Point","coordinates":[116.6997446,39.5128345]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"London, United Kingdom"},"geometry":{"type":"Point","coordinates":[-0.1276474,51.5073219]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Madrid, Comunidad de Madrid, Spain"},"geometry":{"type":"Point","coordinates":[-3.7035825,40.4167047]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Melbourne, Victoria, Australia"},"geometry":{"type":"Point","coordinates":[144.9631608,-37.8142176]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Metropolitan City of Milan, Lombardy, Italy"},"geometry":{"type":"Point","coordinates":[9.2446893,45.5074301]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Moscow, Russian Federation"},"geometry":{"type":"Point","coordinates":[37.6174943,55.7504461]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Mumbai, Maharashtra, India"},"geometry":{"type":"Point","coordinates":[72.8773928,19.0759899]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Nanjing, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[118.7788734,32.0437711]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Paris, Ile-de-France, France"},"geometry":{"type":"Point","coordinates":[2.3635646,48.8206809]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Qingdao, Shandong, China"},"geometry":{"type":"Point","coordinates":[120.3781372,36.0638034]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"San Jose, California, United States"},"geometry":{"type":"Point","coordinates":[-121.890583,37.3361905]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Seattle, Washington, United States"},"geometry":{"type":"Point","coordinates":[-122.3300624,47.6038321]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Shanghai, China"},"geometry":{"type":"Point","coordinates":[121.4692071,31.2322758]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Shenzhen, Guangdong, China"},"geometry":{"type":"Point","coordinates":[114.0543297,22.555454]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Shijiazhuang, Hebei, China"},"geometry":{"type":"Point","coordinates":[114.5088385,38.0429742]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Singapore"},"geometry":{"type":"Point","coordinates":[103.8194992,1.357107]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Sterling, Virginia, United States"},"geometry":{"type":"Point","coordinates":[-77.4033349,39.0017455]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Stockholm, Stockholm County, Sweden"},"geometry":{"type":"Point","coordinates":[18.0710935,59.3251172]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Suzhou, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[120.5810725,31.3016935]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Sydney, New South Wales, Australia"},"geometry":{"type":"Point","coordinates":[151.2164539,-33.8548157]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Tianjin, China"},"geometry":{"type":"Point","coordinates":[117.1951073,39.0856735]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Tokyo, Japan"},"geometry":{"type":"Point","coordinates":[139.7594549,35.6828387]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Wuhan, Hubei, China"},"geometry":{"type":"Point","coordinates":[114.2999353,30.5951051]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Wuxi, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[120.3074357,31.4933074]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Yancheng, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[120.1576778,33.3495657]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Yangzhou, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[119.4077008,32.3969935]}},{"type":"Feature","properties":{"mirror":"阿里云","url":"https://mirrors.aliyun.com/archlinuxcn/","name":"Zhongshan, Guangdong, China"},"geometry":{"type":"Point","coordinates":[113.3656141,22.5213807]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Beijing, China"},"geometry":{"type":"Point","coordinates":[116.3912757,39.906217]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Changzhou, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[119.9691539,31.8122623]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Chengdu, Sichuan, China"},"geometry":{"type":"Point","coordinates":[104.0633717,30.6598628]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Chicago, Illinois, United States"},"geometry":{"type":"Point","coordinates":[-87.6244212,41.8755616]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Dallas, Texas, United States"},"geometry":{"type":"Point","coordinates":[-96.7968559,32.7762719]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Denver, Colorado, United States"},"geometry":{"type":"Point","coordinates":[-104.9848623,39.7392364]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Dongguan, Guangdong, China"},"geometry":{"type":"Point","coordinates":[113.7457788,23.0205969]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Frankfurt, Hesse, Germany"},"geometry":{"type":"Point","coordinates":[8.6820917,50.1106444]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Guangzhou, Guangdong, China"},"geometry":{"type":"Point","coordinates":[113.2592945,23.1301964]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Guiyang, Guizhou, China"},"geometry":{"type":"Point","coordinates":[106.6246178,26.6499922]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Hong Kong"},"geometry":{"type":"Point","coordinates":[114.1628131,22.2793278]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Huangshi, Hubei, China"},"geometry":{"type":"Point","coordinates":[115.0333466,30.200255]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Jinan, Shandong, China"},"geometry":{"type":"Point","coordinates":[117.1140042,36.6507007]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Langfang, Hebei, China"},"geometry":{"type":"Point","coordinates":[116.6997446,39.5128345]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"London, United Kingdom"},"geometry":{"type":"Point","coordinates":[-0.1276474,51.5073219]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Los Angeles, California, United States"},"geometry":{"type":"Point","coordinates":[-118.242766,34.0536909]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Nantong, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[120.8904588,31.9827896]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Paris, Ile-de-France, France"},"geometry":{"type":"Point","coordinates":[2.3635646,48.8206809]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Seattle, Washington, United States"},"geometry":{"type":"Point","coordinates":[-122.3300624,47.6038321]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Shanghai, China"},"geometry":{"type":"Point","coordinates":[121.4692071,31.2322758]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Shenzhen, Guangdong, China"},"geometry":{"type":"Point","coordinates":[114.0543297,22.555454]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Shijiazhuang, Hebei, China"},"geometry":{"type":"Point","coordinates":[114.5088385,38.0429742]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Singapore"},"geometry":{"type":"Point","coordinates":[103.8194992,1.357107]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Suzhou, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[120.5810725,31.3016935]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Tianjin, China"},"geometry":{"type":"Point","coordinates":[117.1951073,39.0856735]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Tokyo, Japan"},"geometry":{"type":"Point","coordinates":[139.7594549,35.6828387]}},{"type":"Feature","properties":{"mirror":"华为云","url":"https://repo.huaweicloud.com/archlinuxcn/","name":"Yancheng, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[120.1576778,33.3495657]}},{"type":"Feature","properties":{"mirror":"清华大学","url":"https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/","name":"Beijing, China"},"geometry":{"type":"Point","coordinates":[116.3912757,39.906217]}},{"type":"Feature","properties":{"mirror":"中国科学技术大学","url":"https://mirrors.ustc.edu.cn/archlinuxcn/","name":"Hefei, Anhui, China"},"geometry":{"type":"Point","coordinates":[117.33251672423167,31.747699500000003]}},{"type":"Feature","properties":{"mirror":"哈尔滨工业大学","url":"https://mirrors.hit.edu.cn/archlinuxcn/","name":"Harbin, Heilongjiang, China"},"geometry":{"type":"Point","coordinates":[126.5303997,45.7988273]}},{"type":"Feature","properties":{"mirror":"吉林大学","url":"https://mirrors.jlu.edu.cn/archlinuxcn/","name":"Changchun, Jilin, China"},"geometry":{"type":"Point","coordinates":[125.285,43.831]}},{"type":"Feature","properties":{"mirror":"浙江大学","url":"https://mirrors.zju.edu.cn/archlinuxcn/","name":"Hangzhou, Zhejiang, China"},"geometry":{"type":"Point","coordinates":[120.2052342,30.2489634]}},{"type":"Feature","properties":{"mirror":"重庆大学","url":"https://mirrors.cqu.edu.cn/archlinuxcn/","name":"Chongqing, China"},"geometry":{"type":"Point","coordinates":[106.5478767,29.5647398]}},{"type":"Feature","properties":{"mirror":"重庆邮电大学","url":"https://mirrors.cqupt.edu.cn/archlinuxcn/","name":"Chongqing, China"},"geometry":{"type":"Point","coordinates":[106.912251,29.431586]}},{"type":"Feature","properties":{"mirror":"南京大学","url":"https://mirrors.nju.edu.cn/archlinuxcn/","name":"Nanjing, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[118.7788734,32.0437711]}},{"type":"Feature","properties":{"mirror":"莞工 GNU/Linux 协会 开源软件镜像站","url":"https://mirrors.dgut.edu.cn/archlinuxcn/","name":"Dongguan, Guangdong, China"},"geometry":{"type":"Point","coordinates":[113.7457788,23.0205969]}},{"type":"Feature","properties":{"mirror":"南方科技大学","url":"https://mirrors.sustech.edu.cn/archlinuxcn/","name":"Shenzhen, Guangdong, China"},"geometry":{"type":"Point","coordinates":[114.0543297,22.555454]}},{"type":"Feature","properties":{"mirror":"武昌首义学院","url":"https://mirrors.wsyu.edu.cn/archlinuxcn/","name":"Wuhan, Hubei, China"},"geometry":{"type":"Point","coordinates":[114.3033,30.48894]}},{"type":"Feature","properties":{"mirror":"北京交通大学","url":"https://mirror.bjtu.edu.cn/archlinuxcn/","name":"Beijing, China"},"geometry":{"type":"Point","coordinates":[116.34974,39.957902]}},{"type":"Feature","properties":{"mirror":"兰州大学","url":"https://mirror.lzu.edu.cn/archlinuxcn/","name":"Lanzhou, Gansu, China"},"geometry":{"type":"Point","coordinates":[103.867812,36.050882]}},{"type":"Feature","properties":{"mirror":"西安交通大学","url":"https://mirrors.xjtu.edu.cn/archlinuxcn/","name":"Xian, Shanxi, China"},"geometry":{"type":"Point","coordinates":[103.993214,30.770399]}},{"type":"Feature","properties":{"mirror":"南阳理工学院","url":"https://mirror.nyist.edu.cn/archlinuxcn/","name":"Nanyang, Henan, China"},"geometry":{"type":"Point","coordinates":[113.621743,23.586677]}},{"type":"Feature","properties":{"mirror":"南京工业大学","url":"https://mirrors.njtech.edu.cn/archlinuxcn/","name":"Nanjing, Jiangsu, China"},"geometry":{"type":"Point","coordinates":[118.647258,32.088423]}},{"type":"Feature","properties":{"mirror":"上海科技大学","url":"https://mirrors.shanghaitech.edu.cn/archlinuxcn/","n·ame":"Shanghai, China"},"geometry":{"type":"Point","coordinates":[121.601394,31.182971]}},{"type":"Feature","properties":{"mirror":"中国科学院软件研究所","url":"https://mirror.iscas.ac.cn/archlinuxcn/","name":"Beijing, China"},"geometry":{"type":"Point","coordinates":[116.343599,39.985537]}},{"type":"Feature","properties":{"mirror":"北京邮电大学","url":"https://mirrors.bupt.edu.cn/archlinuxcn/","name":"Beijing, China"},"geometry":{"type":"Point","coordinates":[116.364594,39.96725]}},{"type":"Feature","properties":{"mirror":"NCKU CCNS","url":"https://archlinux.ccns.ncku.edu.tw/archlinuxcn/","name":"Tainan, Taiwan"},"geometry":{"type":"Point","coordinates":[120.184982,22.9912348]}},{"type":"Feature","properties":{"mirror":"xTom (Hong Kong server)","url":"https://mirrors.xtom.hk/archlinuxcn/","name":"Hong Kong"},"geometry":{"type":"Point","coordinates":[114.1628131,22.2793278]}},{"type":"Feature","properties":{"mirror":"xTom (US server)","url":"https://mirrors.xtom.us/archlinuxcn/","name":"San Jose, California, United States"},"geometry":{"type":"Point","coordinates":[-121.890583,37.3361905]}},{"type":"Feature","properties":{"mirror":"xTom (Netherlands server)","url":"https://mirrors.xtom.nl/archlinuxcn/","name":"Amsterdam, North Holland, Netherlands"},"geometry":{"type":"Point","coordinates":[4.8936041,52.3727598]}},{"type":"Feature","properties":{"mirror":"xTom (Germany server)","url":"https://mirrors.xtom.de/archlinuxcn/","name":"Dusseldorf, North Rhine-Westphalia, Germany"},"geometry":{"type":"Point","coordinates":[6.7763137,51.2254018]}},{"type":"Feature","properties":{"mirror":"xTom (Estonia server)","url":"https://mirrors.xtom.ee/archlinuxcn/","name":"Tallinn, Harju County, Estonia"},"geometry":{"type":"Point","coordinates":[24.7453688,59.4372155]}},{"type":"Feature","properties":{"mirror":"xTom (Japan server)","url":"https://mirrors.xtom.jp/archlinuxcn/","name":"Osaka, Japan"},"geometry":{"type":"Point","coordinates":[135.490357,34.6198813]}},{"type":"Feature","properties":{"mirror":"xTom (Australia server)","url":"https://mirrors.xtom.au/archlinuxcn/","name":"Sydney, Australia"},"geometry":{"type":"Point","coordinates":[151.2082848,-33.8698439]}},{"type":"Feature","properties":{"mirror":"Open Computing Facility, UC Berkeley","url":"https://mirrors.ocf.berkeley.edu/archlinuxcn/","name":"Berkeley, California, United States"},"geometry":{"type":"Point","coordinates":[-122.23963364918777,37.8753497]}}]} diff --git a/list.html b/list.html new file mode 100644 index 0000000..da0d0ca --- /dev/null +++ b/list.html @@ -0,0 +1,141 @@ + + + + + + + Arch Linux CN Community Repository Mirrors + + + + + + +
+ + + + + + + + + + + + +
ProviderRegionProtocolslastupdatex86_64any
+
+ + + diff --git a/manager.py b/manager.py new file mode 100644 index 0000000..e5c5d20 --- /dev/null +++ b/manager.py @@ -0,0 +1,343 @@ +#!/usr/bin/python3 + +import argparse +import datetime +import re +import socket +import sys +from urllib.parse import urlparse, urlunparse + +import httpx # in python-httpx and python-h2 packages +import orjson # in python-orjson package +import ruamel.yaml # in python-ruamel-yaml package + +SOURCE_YAML = "mirrors.yaml" +OUTPUT_README = "README.md" +OUTPUT_MIRRORLIST = "archlinuxcn-mirrorlist" +OUTPUT_GEOJSON = "mirrors.geojson" + +README_ITEM_TEMPLATE = """\ +### {provider} + +```ini +## {title}{comments} +[archlinuxcn] +Server = {url}$arch +``` +""" + +MIRRORLIST_ITEM_TEMPLATE = """\ +## {title}{comments} +# Server = {url}$arch +""" + +README_TEMPLATE = """\ +# Arch Linux CN Community Repository Mirrors + +Here is a list of public mirrors of [our community repository](https://github.com/archlinuxcn/repo). + +## Usage + +Simply install the `archlinuxcn-mirrorlist` package. + +To help you choose the best mirror, you can view the [list of mirrors](https://archlinuxcn.org/mirrors/list.html), the [map of mirrors](https://archlinuxcn.org/mirrors/map.html) and the [synchronization status of mirrors](https://build.archlinuxcn.org/grafana/d/iK2vLpGGk/mirrors). + +### Debuginfod Configuration + +```bash +cp -v archlinuxcn.urls /etc/debuginfod/ +``` + +## Apply Mirror + +If you are interested in applying mirror of our repository, please refer to the [application.md](application.md) for instructions. + +## Mirrors +""" + + +def mirror_title(item): + return f'{item["provider"]} ({item["region"]}) ({", ".join(item["protocols"])})' + + +def mirror_comments(item): + return f'\n## {item["comment"]}' if "comment" in item else "" + + +def readme_item(item): + return README_ITEM_TEMPLATE.format( + title=mirror_title(item), comments=mirror_comments(item), **item + ) + + +def generate_readme(mirrors): + with open(OUTPUT_README, "w", encoding="utf-8") as output: + print( + README_TEMPLATE, + file=output, + ) + print( + ("\n".join(readme_item(item) for item in mirrors)), + file=output, + end="", + ) + + +def mirrorlist_item(item): + return MIRRORLIST_ITEM_TEMPLATE.format( + title=mirror_title(item), comments=mirror_comments(item), **item + ) + + +def generate_mirrorlist(mirrors): + with open(OUTPUT_MIRRORLIST, "w", encoding="utf-8") as output: + print( + f"""\ +## +## Arch Linux CN Community Repository mirrorlist +## Generated on {datetime.date.today()} +## +""", + file=output, + ) + print( + "\n".join(mirrorlist_item(item) for item in mirrors), + file=output, + end="", + ) + + +def sub_readme(args): + with open(SOURCE_YAML, encoding="utf-8") as source: + try: + mirrors = ruamel.yaml.YAML(typ="safe").load(source)["archlinuxcn"] + except ruamel.yaml.YAMLError as error: + sys.exit(repr(error)) + generate_readme(mirrors) + + +def sub_mirrorlist(args): + with open(SOURCE_YAML, encoding="utf-8") as source: + try: + mirrors = ruamel.yaml.YAML(typ="safe").load(source)["archlinuxcn"] + except ruamel.yaml.YAMLError as error: + sys.exit(repr(error)) + generate_mirrorlist(mirrors) + + +def sub_list(args): + with open(SOURCE_YAML, encoding="utf-8") as source: + try: + mirrors = ruamel.yaml.YAML(typ="safe").load(source)["archlinuxcn"] + except ruamel.yaml.YAMLError as error: + sys.exit(repr(error)) + for i, m in enumerate(mirrors, start=1): + print(f'{i:02d}. {m["provider"]}') + + +def get_http_connection(url, provider): + protocols = set() + for ssl_verify, http_connection in ( + (False, "http"), + (True, "https"), + ): + try: + client = httpx.Client( + headers={"User-Agent": "curl/8.5.0"}, + verify=ssl_verify, + timeout=10, + ) + response = client.head(f"{http_connection}://{url.hostname}{url.path}") + if response.status_code == httpx.codes.OK: + protocols.add(http_connection) + response.raise_for_status() + except (httpx.HTTPError, httpx.InvalidURL) as error: + print(provider, http_connection, error) + return protocols + + +def get_ip_version(url, provider): + protocols = set() + socket.setdefaulttimeout(10) + for socket_family, ip_version in ( + (socket.AF_INET, "ipv4"), + (socket.AF_INET6, "ipv6"), + ): + try: + if socket.getaddrinfo(url.hostname, 443, socket_family): + protocols.add(ip_version) + except OSError as error: + print(provider, ip_version, error) + return protocols + + +def update_protocols(mirrors): + for m in mirrors: + url = urlparse(m["url"]) + provider = m["provider"] + m["protocols"] = sorted( + get_http_connection(url, provider) | get_ip_version(url, provider) + ) + m["url"] = urlunparse(url) + + +def sub_protocols(args): + mirrors = [] + yaml = ruamel.yaml.YAML() + with open(SOURCE_YAML, encoding="utf-8") as source: + try: + mirrors = yaml.load(source)["archlinuxcn"] + except ruamel.yaml.YAMLError as error: + sys.exit(repr(error)) + update_protocols(mirrors) + with open(SOURCE_YAML, "w", encoding="utf-8") as output: + yaml.explicit_start = True + yaml.indent(mapping=2, sequence=4, offset=2) + yaml.dump({"archlinuxcn": mirrors}, output) + + +def get_coordinates(client, loc): + try: + params = dict( + zip(["city", "state", "country"][-len(loc.split(", ")) :], loc.split(", ")) + ) + params["format"] = "jsonv2" + params["limit"] = "1" + response = client.get( + "https://nominatim.openstreetmap.org/search", params=params + ) + if not response.json(): + raise ValueError(f"Invalid location for {loc}") + except (httpx.HTTPError, httpx.InvalidURL) as error: + sys.exit(repr(error)) + return f'{response.json()[0]["lat"]}, {response.json()[0]["lon"]}' + + +def update_coordinates(mirrors): + places = {} + client = httpx.Client( + headers={"User-Agent": "curl/8.5.0"}, + http2=True, + ) + for m in mirrors: + locs = m.get("location") + coords = m.get("coordinates") + if locs is coords is None: + continue + coords = [] + for loc in locs: + if loc not in places: + places[loc] = get_coordinates(client, loc) + coords.append(places[loc]) + m["coordinates"] = coords + + +def sub_coordinates(args): + mirrors = [] + yaml = ruamel.yaml.YAML() + with open(SOURCE_YAML, encoding="utf-8") as source: + try: + mirrors = yaml.load(source)["archlinuxcn"] + except ruamel.yaml.YAMLError as error: + sys.exit(repr(error)) + update_coordinates(mirrors) + with open(SOURCE_YAML, "w", encoding="utf-8") as output: + yaml.explicit_start = True + yaml.indent(mapping=2, sequence=4, offset=2) + yaml.dump({"archlinuxcn": mirrors}, output) + + +def generate_geojson(mirrors): + features = [] + geojson = { + "type": "FeatureCollection", + "features": features, + } + for m in mirrors: + locs = m.get("location") + coords = m.get("coordinates") + if locs is coords is None: + continue + for loc, coord in zip(locs, coords, strict=True): + lat, lon = map(float, coord.split(", ")) + features.append( + { + "type": "Feature", + "properties": { + "provider": m["provider"], + "url": m["url"], + "location": loc, + }, + "geometry": { + "type": "Point", + "coordinates": [lon, lat], + }, + } + ) + return geojson + + +def sub_geojson(args): + with open(SOURCE_YAML, encoding="utf-8") as source: + try: + mirrors = ruamel.yaml.YAML(typ="safe").load(source)["archlinuxcn"] + except ruamel.yaml.YAMLError as error: + sys.exit(repr(error)) + geojson = generate_geojson(mirrors) + with open(OUTPUT_GEOJSON, "w", encoding="utf-8") as output: + print( + re.sub( + r"(\[\n\s+)(.*)(,\n\s+)(.*)(\n\s+\])", + r"[\2, \4]", + orjson.dumps(geojson, option=orjson.OPT_INDENT_2).decode("utf8"), + ), + file=output, + ) + + +def sub_all(args): + sub_list(args) + sub_protocols(args) + sub_readme(args) + sub_mirrorlist(args) + sub_coordinates(args) + sub_geojson(args) + + +def main(): + parser = argparse.ArgumentParser( + description="Manage files of Arch Linux CN Community Repository mirrorlist" + ) + sub = parser.add_subparsers() + listparser = sub.add_parser("list", help=f"List mirrors from {SOURCE_YAML}") + listparser.set_defaults(func=sub_list) + protocolsparser = sub.add_parser( + "protocols", help=f"Update protocols for {SOURCE_YAML}" + ) + protocolsparser.set_defaults(func=sub_protocols) + readmeparser = sub.add_parser( + "readme", help=f"Generate {OUTPUT_README} from {SOURCE_YAML}" + ) + readmeparser.set_defaults(func=sub_readme) + mirrorlistparser = sub.add_parser( + "mirrorlist", help=f"Generate {OUTPUT_MIRRORLIST} from {SOURCE_YAML}" + ) + mirrorlistparser.set_defaults(func=sub_mirrorlist) + coordinatesparser = sub.add_parser( + "coordinates", help=f"Update coordinates for {SOURCE_YAML}" + ) + coordinatesparser.set_defaults(func=sub_coordinates) + geojsonparser = sub.add_parser( + "geojson", help=f"Generate {OUTPUT_GEOJSON} from {SOURCE_YAML}" + ) + geojsonparser.set_defaults(func=sub_geojson) + allparser = sub.add_parser("all", help="Execute all operations") + allparser.set_defaults(func=sub_all) + args = parser.parse_args() + if "func" not in args: + parser.print_help() + args.func(args) + + +if __name__ == "__main__": + main() diff --git a/map.html b/map.html index 58ab398..f703121 100644 --- a/map.html +++ b/map.html @@ -1,20 +1,40 @@ - + - - [archlinuxcn] mirror locations - - - - - + + + Arch Linux CN Community Repository Mirrors Map + + + + + + +
diff --git a/mirrors.geojson b/mirrors.geojson new file mode 100644 index 0000000..1468182 --- /dev/null +++ b/mirrors.geojson @@ -0,0 +1,2201 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "provider": "Our main server", + "url": "https://repo.archlinuxcn.org/", + "location": "Amsterdam, North Holland, Netherlands" + }, + "geometry": { + "type": "Point", + "coordinates": [4.8924534, 52.3730796] + } + }, + { + "type": "Feature", + "properties": { + "provider": "中国科学技术大学", + "url": "https://mirrors.ustc.edu.cn/archlinuxcn/", + "location": "Hefei, Anhui, China" + }, + "geometry": { + "type": "Point", + "coordinates": [117.2218033, 31.8228094] + } + }, + { + "type": "Feature", + "properties": { + "provider": "北京外国语大学", + "url": "https://mirrors.bfsu.edu.cn/archlinuxcn/", + "location": "Beijing, China" + }, + "geometry": { + "type": "Point", + "coordinates": [116.412144, 40.190632] + } + }, + { + "type": "Feature", + "properties": { + "provider": "北京交通大学", + "url": "https://mirror.bjtu.edu.cn/archlinuxcn/", + "location": "Beijing, China" + }, + "geometry": { + "type": "Point", + "coordinates": [116.412144, 40.190632] + } + }, + { + "type": "Feature", + "properties": { + "provider": "北京邮电大学", + "url": "https://mirrors.bupt.edu.cn/archlinuxcn/", + "location": "Beijing, China" + }, + "geometry": { + "type": "Point", + "coordinates": [116.412144, 40.190632] + } + }, + { + "type": "Feature", + "properties": { + "provider": "中国科学院软件研究所", + "url": "https://mirror.iscas.ac.cn/archlinuxcn/", + "location": "Beijing, China" + }, + "geometry": { + "type": "Point", + "coordinates": [116.412144, 40.190632] + } + }, + { + "type": "Feature", + "properties": { + "provider": "北京大学", + "url": "https://mirrors.pku.edu.cn/archlinuxcn/", + "location": "Beijing, China" + }, + "geometry": { + "type": "Point", + "coordinates": [116.412144, 40.190632] + } + }, + { + "type": "Feature", + "properties": { + "provider": "清华大学", + "url": "https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/", + "location": "Beijing, China" + }, + "geometry": { + "type": "Point", + "coordinates": [116.412144, 40.190632] + } + }, + { + "type": "Feature", + "properties": { + "provider": "重庆大学", + "url": "https://mirrors.cqu.edu.cn/archlinuxcn/", + "location": "Chongqing, China" + }, + "geometry": { + "type": "Point", + "coordinates": [107.8748712, 30.05518] + } + }, + { + "type": "Feature", + "properties": { + "provider": "重庆邮电大学", + "url": "https://mirrors.cqupt.edu.cn/archlinuxcn/", + "location": "Chongqing, China" + }, + "geometry": { + "type": "Point", + "coordinates": [107.8748712, 30.05518] + } + }, + { + "type": "Feature", + "properties": { + "provider": "兰州大学", + "url": "https://mirrors.lzu.edu.cn/archlinuxcn/", + "location": "Lanzhou, Gansu, China" + }, + "geometry": { + "type": "Point", + "coordinates": [103.8318566, 36.0620781] + } + }, + { + "type": "Feature", + "properties": { + "provider": "南方科技大学", + "url": "https://mirrors.sustech.edu.cn/archlinuxcn/", + "location": "Shenzhen, Guangdong, China" + }, + "geometry": { + "type": "Point", + "coordinates": [114.0545429, 22.5445741] + } + }, + { + "type": "Feature", + "properties": { + "provider": "哈尔滨工业大学", + "url": "https://mirrors.hit.edu.cn/archlinuxcn/", + "location": "Harbin, Heilongjiang, China" + }, + "geometry": { + "type": "Point", + "coordinates": [126.6276177, 45.7593633] + } + }, + { + "type": "Feature", + "properties": { + "provider": "南阳理工学院", + "url": "https://mirror.nyist.edu.cn/archlinuxcn/", + "location": "Nanyang, Henan, China" + }, + "geometry": { + "type": "Point", + "coordinates": [112.5292693, 33.0010496] + } + }, + { + "type": "Feature", + "properties": { + "provider": "荆楚理工学院", + "url": "https://mirrors.jcut.edu.cn/archlinuxcn/", + "location": "Jingmen, Hubei, China" + }, + "geometry": { + "type": "Point", + "coordinates": [112.1937979, 31.0375248] + } + }, + { + "type": "Feature", + "properties": { + "provider": "武昌首义学院", + "url": "https://mirrors.wsyu.edu.cn/archlinuxcn/", + "location": "Wuhan, Hubei, China" + }, + "geometry": { + "type": "Point", + "coordinates": [114.2999353, 30.5951051] + } + }, + { + "type": "Feature", + "properties": { + "provider": "南京工业大学", + "url": "https://mirrors.njtech.edu.cn/archlinuxcn/", + "location": "Nanjing, Jiangsu, China" + }, + "geometry": { + "type": "Point", + "coordinates": [118.7788631, 32.0438284] + } + }, + { + "type": "Feature", + "properties": { + "provider": "南京大学", + "url": "https://mirrors.nju.edu.cn/archlinuxcn/", + "location": "Nanjing, Jiangsu, China" + }, + "geometry": { + "type": "Point", + "coordinates": [118.7788631, 32.0438284] + } + }, + { + "type": "Feature", + "properties": { + "provider": "吉林大学", + "url": "https://mirrors.jlu.edu.cn/archlinuxcn/", + "location": "Changchun, Jilin, China" + }, + "geometry": { + "type": "Point", + "coordinates": [125.3180998, 43.8844201] + } + }, + { + "type": "Feature", + "properties": { + "provider": "沈阳航空航天大学", + "url": "https://mirrors.sau.edu.cn/archlinuxcn/", + "location": "Shenyang, Liaoning, China" + }, + "geometry": { + "type": "Point", + "coordinates": [123.4279105, 41.8026095] + } + }, + { + "type": "Feature", + "properties": { + "provider": "西安交通大学", + "url": "https://mirrors.xjtu.edu.cn/archlinuxcn/", + "location": "Xi'an, Shaanxi, China" + }, + "geometry": { + "type": "Point", + "coordinates": [108.9423443, 34.2607713] + } + }, + { + "type": "Feature", + "properties": { + "provider": "上海交通大学", + "url": "https://mirror.sjtu.edu.cn/archlinux-cn/", + "location": "Shanghai, China" + }, + "geometry": { + "type": "Point", + "coordinates": [121.4700152, 31.2312707] + } + }, + { + "type": "Feature", + "properties": { + "provider": "上海科技大学", + "url": "https://mirrors.shanghaitech.edu.cn/archlinuxcn/", + "location": "Shanghai, China" + }, + "geometry": { + "type": "Point", + "coordinates": [121.4700152, 31.2312707] + } + }, + { + "type": "Feature", + "properties": { + "provider": "浙江大学", + "url": "https://mirrors.zju.edu.cn/archlinuxcn/", + "location": "Hangzhou, Zhejiang, China" + }, + "geometry": { + "type": "Point", + "coordinates": [120.2052342, 30.2489634] + } + }, + { + "type": "Feature", + "properties": { + "provider": "网易", + "url": "https://mirrors.163.com/archlinux-cn/", + "location": "Hangzhou, Zhejiang, China" + }, + "geometry": { + "type": "Point", + "coordinates": [120.2052342, 30.2489634] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Australia" + }, + "geometry": { + "type": "Point", + "coordinates": [134.755, -24.7761086] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Brazil" + }, + "geometry": { + "type": "Point", + "coordinates": [-53.2, -10.3333333] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Anhui, China" + }, + "geometry": { + "type": "Point", + "coordinates": [117.0, 32.0] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Beijing, China" + }, + "geometry": { + "type": "Point", + "coordinates": [116.412144, 40.190632] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Chongqing, China" + }, + "geometry": { + "type": "Point", + "coordinates": [107.8748712, 30.05518] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Fujian, China" + }, + "geometry": { + "type": "Point", + "coordinates": [118.2208721, 26.193218] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Gansu, China" + }, + "geometry": { + "type": "Point", + "coordinates": [101.9999999, 38.0000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Guangdong, China" + }, + "geometry": { + "type": "Point", + "coordinates": [113.1982688, 23.1357694] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Guangxi, China" + }, + "geometry": { + "type": "Point", + "coordinates": [109.0, 24.0] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Guizhou, China" + }, + "geometry": { + "type": "Point", + "coordinates": [107.0, 27.0] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Hainan, China" + }, + "geometry": { + "type": "Point", + "coordinates": [109.5999999, 19.2000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Hebei, China" + }, + "geometry": { + "type": "Point", + "coordinates": [116.0, 39.0000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Heilongjiang, China" + }, + "geometry": { + "type": "Point", + "coordinates": [127.999992, 48.0000047] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Henan, China" + }, + "geometry": { + "type": "Point", + "coordinates": [113.9999999, 34.0000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Hong Kong, China" + }, + "geometry": { + "type": "Point", + "coordinates": [114.1849161, 22.350627] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Hubei, China" + }, + "geometry": { + "type": "Point", + "coordinates": [112.88064226239663, 31.15305035] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Hunan, China" + }, + "geometry": { + "type": "Point", + "coordinates": [111.7487063, 27.6662087] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Inner Mongolia, China" + }, + "geometry": { + "type": "Point", + "coordinates": [114.3251664, 43.2443242] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Jiangsu, China" + }, + "geometry": { + "type": "Point", + "coordinates": [119.9999999, 33.0000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Jiangxi, China" + }, + "geometry": { + "type": "Point", + "coordinates": [116.0, 28.0] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Jilin, China" + }, + "geometry": { + "type": "Point", + "coordinates": [126.1997366, 43.7289674] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Liaoning, China" + }, + "geometry": { + "type": "Point", + "coordinates": [122.9955469, 41.2374106] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Ningxia, China" + }, + "geometry": { + "type": "Point", + "coordinates": [105.9999999, 37.0000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Qinghai, China" + }, + "geometry": { + "type": "Point", + "coordinates": [95.95211573241954, 35.40709525] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Shaanxi, China" + }, + "geometry": { + "type": "Point", + "coordinates": [109.3013107, 35.5895959] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Shandong, China" + }, + "geometry": { + "type": "Point", + "coordinates": [118.5055691, 36.398987] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Shanghai, China" + }, + "geometry": { + "type": "Point", + "coordinates": [121.4700152, 31.2312707] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Shanxi, China" + }, + "geometry": { + "type": "Point", + "coordinates": [112.0, 37.0] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Sichuan, China" + }, + "geometry": { + "type": "Point", + "coordinates": [102.4999999, 30.5000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Tianjin, China" + }, + "geometry": { + "type": "Point", + "coordinates": [117.4163641, 39.3032619] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Tibet, China" + }, + "geometry": { + "type": "Point", + "coordinates": [90.8749807, 29.8556443] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Xinjiang, China" + }, + "geometry": { + "type": "Point", + "coordinates": [85.4633464, 42.4804953] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Yunnan, China" + }, + "geometry": { + "type": "Point", + "coordinates": [102.0, 25.0] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Zhejiang, China" + }, + "geometry": { + "type": "Point", + "coordinates": [119.9999999, 29.0000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "France" + }, + "geometry": { + "type": "Point", + "coordinates": [1.8883335, 46.603354] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Germany" + }, + "geometry": { + "type": "Point", + "coordinates": [10.4478313, 51.1638175] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "India" + }, + "geometry": { + "type": "Point", + "coordinates": [78.6677428, 22.3511148] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Indonesia" + }, + "geometry": { + "type": "Point", + "coordinates": [117.8902853, -2.4833826] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Italy" + }, + "geometry": { + "type": "Point", + "coordinates": [12.674297, 42.6384261] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Japan" + }, + "geometry": { + "type": "Point", + "coordinates": [139.2394179, 36.5748441] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Kuwait" + }, + "geometry": { + "type": "Point", + "coordinates": [47.4979476, 29.2733964] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Malaysia" + }, + "geometry": { + "type": "Point", + "coordinates": [102.2656823, 4.5693754] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Netherlands" + }, + "geometry": { + "type": "Point", + "coordinates": [5.541246849406163, 52.24764975] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Nigeria" + }, + "geometry": { + "type": "Point", + "coordinates": [7.9999721, 9.6000359] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Oman" + }, + "geometry": { + "type": "Point", + "coordinates": [57.0036901, 21.0000287] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Pakistan" + }, + "geometry": { + "type": "Point", + "coordinates": [71.247499, 30.3308401] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Philippines" + }, + "geometry": { + "type": "Point", + "coordinates": [122.7312101, 12.7503486] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Qatar" + }, + "geometry": { + "type": "Point", + "coordinates": [51.2295295, 25.3336984] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Singapore" + }, + "geometry": { + "type": "Point", + "coordinates": [103.8194992, 1.357107] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "South Africa" + }, + "geometry": { + "type": "Point", + "coordinates": [24.991639, -28.8166236] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "South Korea" + }, + "geometry": { + "type": "Point", + "coordinates": [127.6961188, 36.638392] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Spain" + }, + "geometry": { + "type": "Point", + "coordinates": [-4.8379791, 39.3260685] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Sweden" + }, + "geometry": { + "type": "Point", + "coordinates": [14.5208584, 59.6749712] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Thailand" + }, + "geometry": { + "type": "Point", + "coordinates": [100.83273, 14.8971921] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Turkey" + }, + "geometry": { + "type": "Point", + "coordinates": [34.9249653, 38.9597594] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "Ukraine" + }, + "geometry": { + "type": "Point", + "coordinates": [31.2718321, 49.4871968] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "United Arab Emirates" + }, + "geometry": { + "type": "Point", + "coordinates": [53.9994829, 24.0002488] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "United Kingdom" + }, + "geometry": { + "type": "Point", + "coordinates": [-3.2765753, 54.7023545] + } + }, + { + "type": "Feature", + "properties": { + "provider": "阿里云", + "url": "https://mirrors.aliyun.com/archlinuxcn/", + "location": "United States" + }, + "geometry": { + "type": "Point", + "coordinates": [-100.445882, 39.7837304] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Argentina" + }, + "geometry": { + "type": "Point", + "coordinates": [-64.9672817, -34.9964963] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Australia" + }, + "geometry": { + "type": "Point", + "coordinates": [134.755, -24.7761086] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Austria" + }, + "geometry": { + "type": "Point", + "coordinates": [14.12456, 47.59397] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Bahrain" + }, + "geometry": { + "type": "Point", + "coordinates": [50.5344606, 26.1551249] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Bangladesh" + }, + "geometry": { + "type": "Point", + "coordinates": [90.2934413, 24.4769288] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Belgium" + }, + "geometry": { + "type": "Point", + "coordinates": [4.6667145, 50.6402809] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Brazil" + }, + "geometry": { + "type": "Point", + "coordinates": [-53.2, -10.3333333] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Cambodia" + }, + "geometry": { + "type": "Point", + "coordinates": [104.8144914, 12.5433216] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Canada" + }, + "geometry": { + "type": "Point", + "coordinates": [-107.991707, 61.0666922] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Chile" + }, + "geometry": { + "type": "Point", + "coordinates": [-71.3187697, -31.7613365] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Anhui, China" + }, + "geometry": { + "type": "Point", + "coordinates": [117.0, 32.0] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Beijing, China" + }, + "geometry": { + "type": "Point", + "coordinates": [116.412144, 40.190632] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Chongqing, China" + }, + "geometry": { + "type": "Point", + "coordinates": [107.8748712, 30.05518] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Fujian, China" + }, + "geometry": { + "type": "Point", + "coordinates": [118.2208721, 26.193218] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Gansu, China" + }, + "geometry": { + "type": "Point", + "coordinates": [101.9999999, 38.0000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Guangdong, China" + }, + "geometry": { + "type": "Point", + "coordinates": [113.1982688, 23.1357694] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Guangxi, China" + }, + "geometry": { + "type": "Point", + "coordinates": [109.0, 24.0] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Guizhou, China" + }, + "geometry": { + "type": "Point", + "coordinates": [107.0, 27.0] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Hainan, China" + }, + "geometry": { + "type": "Point", + "coordinates": [109.5999999, 19.2000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Hebei, China" + }, + "geometry": { + "type": "Point", + "coordinates": [116.0, 39.0000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Heilongjiang, China" + }, + "geometry": { + "type": "Point", + "coordinates": [127.999992, 48.0000047] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Henan, China" + }, + "geometry": { + "type": "Point", + "coordinates": [113.9999999, 34.0000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Hong Kong, China" + }, + "geometry": { + "type": "Point", + "coordinates": [114.1849161, 22.350627] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Hubei, China" + }, + "geometry": { + "type": "Point", + "coordinates": [112.88064226239663, 31.15305035] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Hunan, China" + }, + "geometry": { + "type": "Point", + "coordinates": [111.7487063, 27.6662087] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Inner Mongolia, China" + }, + "geometry": { + "type": "Point", + "coordinates": [114.3251664, 43.2443242] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Jiangsu, China" + }, + "geometry": { + "type": "Point", + "coordinates": [119.9999999, 33.0000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Jiangxi, China" + }, + "geometry": { + "type": "Point", + "coordinates": [116.0, 28.0] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Jilin, China" + }, + "geometry": { + "type": "Point", + "coordinates": [126.1997366, 43.7289674] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Liaoning, China" + }, + "geometry": { + "type": "Point", + "coordinates": [122.9955469, 41.2374106] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Macau, China" + }, + "geometry": { + "type": "Point", + "coordinates": [113.5514142, 22.1757605] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Ningxia, China" + }, + "geometry": { + "type": "Point", + "coordinates": [105.9999999, 37.0000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Qinghai, China" + }, + "geometry": { + "type": "Point", + "coordinates": [95.95211573241954, 35.40709525] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Shaanxi, China" + }, + "geometry": { + "type": "Point", + "coordinates": [109.3013107, 35.5895959] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Shandong, China" + }, + "geometry": { + "type": "Point", + "coordinates": [118.5055691, 36.398987] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Shanghai, China" + }, + "geometry": { + "type": "Point", + "coordinates": [121.4700152, 31.2312707] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Shanxi, China" + }, + "geometry": { + "type": "Point", + "coordinates": [112.0, 37.0] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Sichuan, China" + }, + "geometry": { + "type": "Point", + "coordinates": [102.4999999, 30.5000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Tianjin, China" + }, + "geometry": { + "type": "Point", + "coordinates": [117.4163641, 39.3032619] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Tibet, China" + }, + "geometry": { + "type": "Point", + "coordinates": [90.8749807, 29.8556443] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Xinjiang, China" + }, + "geometry": { + "type": "Point", + "coordinates": [85.4633464, 42.4804953] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Yunnan, China" + }, + "geometry": { + "type": "Point", + "coordinates": [102.0, 25.0] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Zhejiang, China" + }, + "geometry": { + "type": "Point", + "coordinates": [119.9999999, 29.0000001] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Colombia" + }, + "geometry": { + "type": "Point", + "coordinates": [-72.9088133, 4.099917] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Denmark" + }, + "geometry": { + "type": "Point", + "coordinates": [10.3333283, 55.670249] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Djibouti" + }, + "geometry": { + "type": "Point", + "coordinates": [42.8453061, 11.8145966] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Ecuador" + }, + "geometry": { + "type": "Point", + "coordinates": [-79.3666965, -1.3397668] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Egypt" + }, + "geometry": { + "type": "Point", + "coordinates": [29.2675469, 26.2540493] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Finland" + }, + "geometry": { + "type": "Point", + "coordinates": [25.9209164, 63.2467777] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "France" + }, + "geometry": { + "type": "Point", + "coordinates": [1.8883335, 46.603354] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Germany" + }, + "geometry": { + "type": "Point", + "coordinates": [10.4478313, 51.1638175] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "India" + }, + "geometry": { + "type": "Point", + "coordinates": [78.6677428, 22.3511148] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Indonesia" + }, + "geometry": { + "type": "Point", + "coordinates": [117.8902853, -2.4833826] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Iraq" + }, + "geometry": { + "type": "Point", + "coordinates": [44.1749775, 33.0955793] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Israel" + }, + "geometry": { + "type": "Point", + "coordinates": [34.8594762, 30.8124247] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Italy" + }, + "geometry": { + "type": "Point", + "coordinates": [12.674297, 42.6384261] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Japan" + }, + "geometry": { + "type": "Point", + "coordinates": [139.2394179, 36.5748441] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Kenya" + }, + "geometry": { + "type": "Point", + "coordinates": [38.4313975, 1.4419683] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Kuwait" + }, + "geometry": { + "type": "Point", + "coordinates": [47.4979476, 29.2733964] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Kyrgyzstan" + }, + "geometry": { + "type": "Point", + "coordinates": [74.724091, 41.5089324] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Laos" + }, + "geometry": { + "type": "Point", + "coordinates": [103.378253, 20.0171109] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Lebanon" + }, + "geometry": { + "type": "Point", + "coordinates": [35.843409, 33.8750629] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Madagascar" + }, + "geometry": { + "type": "Point", + "coordinates": [46.4416422, -18.9249604] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Malaysia" + }, + "geometry": { + "type": "Point", + "coordinates": [102.2656823, 4.5693754] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Mauritius" + }, + "geometry": { + "type": "Point", + "coordinates": [57.5703566, -20.2759451] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Mexico" + }, + "geometry": { + "type": "Point", + "coordinates": [-102.0077097, 23.6585116] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Mongolia" + }, + "geometry": { + "type": "Point", + "coordinates": [103.8499736, 46.8250388] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Myanmar" + }, + "geometry": { + "type": "Point", + "coordinates": [95.9999652, 17.1750495] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Nepal" + }, + "geometry": { + "type": "Point", + "coordinates": [84.0917139, 28.1083929] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Netherlands" + }, + "geometry": { + "type": "Point", + "coordinates": [5.541246849406163, 52.24764975] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "New Zealand" + }, + "geometry": { + "type": "Point", + "coordinates": [172.8344077, -41.5000831] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Oman" + }, + "geometry": { + "type": "Point", + "coordinates": [57.0036901, 21.0000287] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Pakistan" + }, + "geometry": { + "type": "Point", + "coordinates": [71.247499, 30.3308401] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Peru" + }, + "geometry": { + "type": "Point", + "coordinates": [-75.0458515, -6.8699697] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Philippines" + }, + "geometry": { + "type": "Point", + "coordinates": [122.7312101, 12.7503486] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Poland" + }, + "geometry": { + "type": "Point", + "coordinates": [19.134422, 52.215933] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Qatar" + }, + "geometry": { + "type": "Point", + "coordinates": [51.2295295, 25.3336984] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Saudi Arabia" + }, + "geometry": { + "type": "Point", + "coordinates": [42.3528328, 25.6242618] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Singapore" + }, + "geometry": { + "type": "Point", + "coordinates": [103.8194992, 1.357107] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "South Africa" + }, + "geometry": { + "type": "Point", + "coordinates": [24.991639, -28.8166236] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "South Korea" + }, + "geometry": { + "type": "Point", + "coordinates": [127.6961188, 36.638392] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Spain" + }, + "geometry": { + "type": "Point", + "coordinates": [-4.8379791, 39.3260685] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Sweden" + }, + "geometry": { + "type": "Point", + "coordinates": [14.5208584, 59.6749712] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Taiwan" + }, + "geometry": { + "type": "Point", + "coordinates": [120.9820179, 23.9739374] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Thailand" + }, + "geometry": { + "type": "Point", + "coordinates": [100.83273, 14.8971921] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Turkey" + }, + "geometry": { + "type": "Point", + "coordinates": [34.9249653, 38.9597594] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "United Arab Emirates" + }, + "geometry": { + "type": "Point", + "coordinates": [53.9994829, 24.0002488] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "United Kingdom" + }, + "geometry": { + "type": "Point", + "coordinates": [-3.2765753, 54.7023545] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "United States" + }, + "geometry": { + "type": "Point", + "coordinates": [-100.445882, 39.7837304] + } + }, + { + "type": "Feature", + "properties": { + "provider": "腾讯云", + "url": "https://mirrors.cloud.tencent.com/archlinuxcn/", + "location": "Vietnam" + }, + "geometry": { + "type": "Point", + "coordinates": [107.9650855, 15.9266657] + } + }, + { + "type": "Feature", + "properties": { + "provider": "xTom (香港伺服器)", + "url": "https://mirrors.xtom.hk/archlinuxcn/", + "location": "Hong Kong, China" + }, + "geometry": { + "type": "Point", + "coordinates": [114.1849161, 22.350627] + } + }, + { + "type": "Feature", + "properties": { + "provider": "國立成功大學", + "url": "https://archlinux.ccns.ncku.edu.tw/archlinuxcn/", + "location": "Tainan, Taiwan" + }, + "geometry": { + "type": "Point", + "coordinates": [120.184982, 22.9912348] + } + }, + { + "type": "Feature", + "properties": { + "provider": "xTom (Australia server)", + "url": "https://mirrors.xtom.au/archlinuxcn/", + "location": "Sydney, New South Wales, Australia" + }, + "geometry": { + "type": "Point", + "coordinates": [151.2082848, -33.8698439] + } + }, + { + "type": "Feature", + "properties": { + "provider": "xTom (Estonia server)", + "url": "https://mirrors.xtom.ee/archlinuxcn/", + "location": "Tallinn, Harju, Estonia" + }, + "geometry": { + "type": "Point", + "coordinates": [24.7453688, 59.4372155] + } + }, + { + "type": "Feature", + "properties": { + "provider": "xTom (Germany server)", + "url": "https://mirrors.xtom.de/archlinuxcn/", + "location": "Düsseldorf, North Rhine-Westphalia, Germany" + }, + "geometry": { + "type": "Point", + "coordinates": [6.7763137, 51.2254018] + } + }, + { + "type": "Feature", + "properties": { + "provider": "xTom (Japan server)", + "url": "https://mirrors.xtom.jp/archlinuxcn/", + "location": "Osaka, Japan" + }, + "geometry": { + "type": "Point", + "coordinates": [135.490357, 34.6198813] + } + }, + { + "type": "Feature", + "properties": { + "provider": "xTom (Netherlands server)", + "url": "https://mirrors.xtom.nl/archlinuxcn/", + "location": "Amsterdam, North Holland, Netherlands" + }, + "geometry": { + "type": "Point", + "coordinates": [4.8924534, 52.3730796] + } + }, + { + "type": "Feature", + "properties": { + "provider": "University of California, Berkeley", + "url": "https://mirrors.ocf.berkeley.edu/archlinuxcn/", + "location": "Berkeley, California, United States" + }, + "geometry": { + "type": "Point", + "coordinates": [-122.272863, 37.8708393] + } + }, + { + "type": "Feature", + "properties": { + "provider": "xTom (United States server)", + "url": "https://mirrors.xtom.us/archlinuxcn/", + "location": "San Jose, California, United States" + }, + "geometry": { + "type": "Point", + "coordinates": [-121.890591, 37.3361663] + } + } + ] +} diff --git a/mirrors.yaml b/mirrors.yaml index a1dd1a7..2dca073 100644 --- a/mirrors.yaml +++ b/mirrors.yaml @@ -1,705 +1,725 @@ -- provider: Our main server - url: https://repo.archlinuxcn.org/ - location: Amsterdam, the Netherlands - geolocs: - - Amsterdam, North Holland, Netherlands - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 52.3727598, 4.8936041 -- provider: 北京外国语大学 - url: https://mirrors.bfsu.edu.cn/archlinuxcn/ - added_date: 2020-05-18 - location: 北京 - geolocs: - - Beijing, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 39.906217, 116.3912757 -- provider: 北京大学 - url: https://mirrors.pku.edu.cn/archlinuxcn/ - added_date: 2023-02-26 - location: 北京 - geolocs: - - Beijing, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 39.906217, 116.3912757 -- provider: 腾讯云 - url: https://mirrors.cloud.tencent.com/archlinuxcn/ - location: Global CDN - geolocs: - - Amsterdam, North Holland, Netherlands - - Atlanta, Georgia, United States - - Bengbu, Anhui, China - - Changsha, Hunan, China - - Changzhou, Jiangsu, China - - Chennai, Tamil Nadu, India - - Foshan, Guangdong, China - - Frankfurt, Hesse, Germany - - Fujairah, Emirate of Fujairah, United Arab Emirates - - Fuzhou, Fujian, China - - Guangzhou, Guangdong, China - - Guiyang, Guizhou, China - - Hong Kong - - Huizhou, Guangdong, China - - Hunan, China - - Jinan, Shandong, China - - Jiujiang, Jiangxi, China - - Kunming, Yunnan, China - - London, United Kingdom - - Los Angeles, California, United States - - Manila, Metro Manila, Philippines - - Melbourne, Victoria, Australia - - Mumbai, Maharashtra, India - - Nanchang, Jiangxi, China - - Nanjing, Jiangsu, China - - Nantong, Jiangsu, China - - Ningbo, Zhejiang, China - - Osaka, Japan - - Pasig, Metro Manila, Philippines - - Shanghai, China - - Shenyang, Liaoning, China - - Shenzhen, Guangdong, China - - Shijiazhuang, Hebei, China - - Singapore - - Suzhou, Jiangsu, China - - Taiyuan, Shanxi, China - - Tangshan, Hebei, China - - Tianjin, China - - Wuhan, Hubei, China - - Wuhu, Anhui, China - - Wuxi, Jiangsu, China - - Xiamen, Fujian, China - - Xining, Qinghai, China - - Yantai, Shandong, China - - Zhengzhou, Henan, China - - Zibo, Shandong, China - added_date: 2018-11-23 - protocols: - - ipv4 - - http - - https - geocoords: - - 52.3727598, 4.8936041 - - 33.7489924, -84.3902644 - - 32.9176422, 117.3825673 - - 28.2302056, 112.9335861 - - 31.8122623, 119.9691539 - - 13.0836939, 80.270186 - - 23.1102636, 112.99801241836545 - - 50.1106444, 8.6820917 - - 25.1212273, 56.33403414986288 - - 25.937271600000003, 119.17376067528227 - - 23.1301964, 113.2592945 - - 26.6499922, 106.6246178 - - 22.2793278, 114.1628131 - - 23.1146515, 114.4107202 - - 27.6662087, 111.7487063 - - 36.6507007, 117.1140042 - - 29.6653828, 115.9474861 - - 24.8843019, 102.8324209 - - 51.5073219, -0.1276474 - - 34.0536909, -118.242766 - - 14.5907332, 120.9809674 - - -37.8142176, 144.9631608 - - 19.0759899, 72.8773928 - - 28.687547, 115.8540042 - - 32.0437711, 118.7788734 - - 31.9827896, 120.8904588 - - 29.8622194, 121.6203873 - - 34.6198813, 135.490357 - - 14.5594821, 121.0812368 - - 31.2322758, 121.4692071 - - 41.6749893, 123.458674 - - 22.555454, 114.0543297 - - 38.0429742, 114.5088385 - - 1.357107, 103.8194992 - - 31.3016935, 120.5810725 - - 37.870009, 112.5452739 - - 39.6295591, 118.1738665 - - 39.0856735, 117.1951073 - - 30.5951051, 114.2999353 - - 31.3536127, 118.4277477 - - 31.4933074, 120.3074357 - - 24.4801069, 118.0853479 - - 36.617331, 101.7761976 - - 37.461928, 121.4425255 - - 34.7487244, 113.6191483 - - 36.819626, 117.980675 -- provider: 网易 - url: https://mirrors.163.com/archlinux-cn/ - location: China CDN - geolocs: - - Changsha, Hunan, China - - Dezhou, Shandong, China - - Foshan, Guangdong, China - - Fuzhou, Fujian, China - - Hangzhou, Zhejiang, China - - Jinhua, Zhejiang, China - - Lianyungang, Jiangsu, China - - Maoming, Guangdong, China - - Nantong, Jiangsu, China - - Quzhou, Zhejiang, China - - Tianjin, China - - Zhongshan, Guangdong, China - frequency: 1d - protocols: - - ipv4 - - http - - https - geocoords: - - 28.2302056, 112.9335861 - - 37.4486676, 116.305416 - - 23.1102636, 112.99801241836545 - - 25.937271600000003, 119.17376067528227 - - 30.2489634, 120.2052342 - - 29.1080344, 119.6486487 - - 34.5978596, 119.215813 - - 21.6656961, 110.9209511 - - 31.9827896, 120.8904588 - - 28.9268429, 118.8759775 - - 39.0856735, 117.1951073 - - 22.5213807, 113.3656141 -- provider: 阿里云 - url: https://mirrors.aliyun.com/archlinuxcn/ - added_date: 2020-07-03 - location: Global CDN - geolocs: - - Amsterdam, North Holland, Netherlands - - Beijing, China - - Changzhou, Jiangsu, China - - Chicago, Illinois, United States - - Dallas, Texas, United States - - Dongguan, Guangdong, China - - Foshan, Guangdong, China - - Frankfurt, Hesse, Germany - - Guangzhou, Guangdong, China - - Hohhot, Inner Mongolia, China - - Hong Kong - - Huizhou, Guangdong, China - - Kiev, Ukraine - - Langfang, Hebei, China - - London, United Kingdom - - Madrid, Comunidad de Madrid, Spain - - Melbourne, Victoria, Australia - - Metropolitan City of Milan, Lombardy, Italy - - Moscow, Russian Federation - - Mumbai, Maharashtra, India - - Nanjing, Jiangsu, China - - Paris, Ile-de-France, France - - Qingdao, Shandong, China - - San Jose, California, United States - - Seattle, Washington, United States - - Shanghai, China - - Shenzhen, Guangdong, China - - Shijiazhuang, Hebei, China - - Singapore - - Sterling, Virginia, United States - - Stockholm, Stockholm County, Sweden - - Suzhou, Jiangsu, China - - Sydney, New South Wales, Australia - - Tianjin, China - - Tokyo, Japan - - Wuhan, Hubei, China - - Wuxi, Jiangsu, China - - Yancheng, Jiangsu, China - - Yangzhou, Jiangsu, China - - Zhongshan, Guangdong, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 52.3727598, 4.8936041 - - 39.906217, 116.3912757 - - 31.8122623, 119.9691539 - - 41.8755616, -87.6244212 - - 32.7762719, -96.7968559 - - 23.0205969, 113.7457788 - - 23.1102636, 112.99801241836545 - - 50.1106444, 8.6820917 - - 23.1301964, 113.2592945 - - 40.8337963, 111.6730788 - - 22.2793278, 114.1628131 - - 23.1146515, 114.4107202 - - 50.4500336, 30.5241361 - - 39.5128345, 116.6997446 - - 51.5073219, -0.1276474 - - 40.4167047, -3.7035825 - - -37.8142176, 144.9631608 - - 45.5074301, 9.2446893 - - 55.7504461, 37.6174943 - - 19.0759899, 72.8773928 - - 32.0437711, 118.7788734 - - 48.8206809, 2.3635646 - - 36.0638034, 120.3781372 - - 37.3361905, -121.890583 - - 47.6038321, -122.3300624 - - 31.2322758, 121.4692071 - - 22.555454, 114.0543297 - - 38.0429742, 114.5088385 - - 1.357107, 103.8194992 - - 39.0017455, -77.4033349 - - 59.3251172, 18.0710935 - - 31.3016935, 120.5810725 - - -33.8548157, 151.2164539 - - 39.0856735, 117.1951073 - - 35.6828387, 139.7594549 - - 30.5951051, 114.2999353 - - 31.4933074, 120.3074357 - - 33.3495657, 120.1576778 - - 32.3969935, 119.4077008 - - 22.5213807, 113.3656141 -- provider: 华为云 - url: https://repo.huaweicloud.com/archlinuxcn/ - added_date: 2020-10-31 - location: Global CDN - geolocs: - - Beijing, China - - Changzhou, Jiangsu, China - - Chengdu, Sichuan, China - - Chicago, Illinois, United States - - Dallas, Texas, United States - - Denver, Colorado, United States - - Dongguan, Guangdong, China - - Frankfurt, Hesse, Germany - - Guangzhou, Guangdong, China - - Guiyang, Guizhou, China - - Hong Kong - - Huangshi, Hubei, China - - Jinan, Shandong, China - - Langfang, Hebei, China - - London, United Kingdom - - Los Angeles, California, United States - - Nantong, Jiangsu, China - - Paris, Ile-de-France, France - - Seattle, Washington, United States - - Shanghai, China - - Shenzhen, Guangdong, China - - Shijiazhuang, Hebei, China - - Singapore - - Suzhou, Jiangsu, China - - Tianjin, China - - Tokyo, Japan - - Yancheng, Jiangsu, China - protocols: - - ipv4 - - http - - https - geocoords: - - 39.906217, 116.3912757 - - 31.8122623, 119.9691539 - - 30.6598628, 104.0633717 - - 41.8755616, -87.6244212 - - 32.7762719, -96.7968559 - - 39.7392364, -104.9848623 - - 23.0205969, 113.7457788 - - 50.1106444, 8.6820917 - - 23.1301964, 113.2592945 - - 26.6499922, 106.6246178 - - 22.2793278, 114.1628131 - - 30.200255, 115.0333466 - - 36.6507007, 117.1140042 - - 39.5128345, 116.6997446 - - 51.5073219, -0.1276474 - - 34.0536909, -118.242766 - - 31.9827896, 120.8904588 - - 48.8206809, 2.3635646 - - 47.6038321, -122.3300624 - - 31.2322758, 121.4692071 - - 22.555454, 114.0543297 - - 38.0429742, 114.5088385 - - 1.357107, 103.8194992 - - 31.3016935, 120.5810725 - - 39.0856735, 117.1951073 - - 35.6828387, 139.7594549 - - 33.3495657, 120.1576778 -- provider: 清华大学 - url: https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/ - frequency: realtime - location: 北京 - geolocs: - - Beijing, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 39.906217, 116.3912757 -- provider: 中国科学技术大学 - url: https://mirrors.ustc.edu.cn/archlinuxcn/ - frequency: realtime - location: 安徽合肥 - geolocs: - - Hefei, Anhui, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 31.747699500000003, 117.33251672423167 -- provider: 哈尔滨工业大学 - url: https://mirrors.hit.edu.cn/archlinuxcn/ - added_date: 2021-01-09 - location: 黑龙江哈尔滨 - geolocs: - - Harbin, Heilongjiang, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 45.7988273, 126.5303997 -- provider: 吉林大学 - url: https://mirrors.jlu.edu.cn/archlinuxcn/ - added_date: 2023-04-21 - location: 吉林长春 - geolocs: - - Changchun, Jilin, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 43.831, 125.285 -- provider: 浙江大学 - url: https://mirrors.zju.edu.cn/archlinuxcn/ - location: 浙江杭州 - geolocs: - - Hangzhou, Zhejiang, China - protocols: - - ipv4 - - ipv6 - - http - - https - network: CERNET - frequency: 6h - added_date: 2017-06-05 - geocoords: - - 30.2489634, 120.2052342 -- provider: 重庆大学 - url: https://mirrors.cqu.edu.cn/archlinuxcn/ - location: 重庆 - geolocs: - - Chongqing, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 29.5647398, 106.5478767 -- provider: 重庆邮电大学 - url: https://mirrors.cqupt.edu.cn/archlinuxcn/ - location: 重庆 - geolocs: - - Chongqing, China - protocols: - - ipv4 - geocoords: - - 29.431586, 106.912251 -- provider: SJTUG 软件源镜像服务 - url: https://mirror.sjtu.edu.cn/archlinux-cn/ - location: 上海 - gelocs: - - Shanghai, China - added_date: 2018-05-21 - protocols: - - ipv4 - - ipv6 - - https -- provider: 南京大学 - url: https://mirrors.nju.edu.cn/archlinuxcn/ - location: 江苏南京 - geolocs: - - Nanjing, Jiangsu, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 32.0437711, 118.7788734 -- provider: 莞工 GNU/Linux 协会 开源软件镜像站 - url: https://mirrors.dgut.edu.cn/archlinuxcn/ - location: 广东东莞 - geolocs: - - Dongguan, Guangdong, China - added_date: 2018-11-03 - frequency: 6h - protocols: - - ipv4 - geocoords: - - 23.0205969, 113.7457788 -- provider: 南方科技大学 - url: https://mirrors.sustech.edu.cn/archlinuxcn/ - location: 广东深圳 - geolocs: - - Shenzhen, Guangdong, China - added_date: 2021-08-17 - frequency: 6h - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 22.555454, 114.0543297 -- provider: 武昌首义学院 - url: https://mirrors.wsyu.edu.cn/archlinuxcn/ - location: 湖北武汉 - geolocs: - - Wuhan, Hubei, China - added_date: 2023-04-07 - frequency: 3m - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 30.48894, 114.30330 -- provider: 北京交通大学 - url: https://mirror.bjtu.edu.cn/archlinuxcn/ - added_date: 2023-08-19 - location: 北京 - geolocs: - - Beijing, China - protocols: - - ipv4 - - ipv6 - - https - geocoords: - - 39.957902, 116.34974 -- provider: 兰州大学 - url: https://mirror.lzu.edu.cn/archlinuxcn/ - added_date: 2023-08-19 - location: 甘肃兰州 - geolocs: - - Lanzhou, Gansu, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 36.050882, 103.867812 -- provider: 西安交通大学 - url: https://mirrors.xjtu.edu.cn/archlinuxcn/ - added_date: 2023-08-19 - location: 陕西西安 - geolocs: - - Xian, Shanxi, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 30.770399, 103.993214 -- provider: 南阳理工学院 - url: https://mirror.nyist.edu.cn/archlinuxcn/ - added_date: 2023-08-19 - location: 河南南阳 - geolocs: - - Nanyang, Henan, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 23.586677, 113.621743 -- provider: 南京工业大学 - url: https://mirrors.njtech.edu.cn/archlinuxcn/ - added_date: 2023-08-19 - location: 江苏南京 - geolocs: - - Nanjing, Jiangsu, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 32.088423, 118.647258 -- provider: 上海科技大学 - url: https://mirrors.shanghaitech.edu.cn/archlinuxcn/ - added_date: 2023-08-19 - location: 上海 - geolocs: - - Shanghai, China - protocols: - - ipv4 - - https - geocoords: - - 31.182971, 121.601394 -- provider: 中国科学院软件研究所 - url: https://mirror.iscas.ac.cn/archlinuxcn/ - added_date: 2023-08-19 - location: 北京 - geolocs: - - Beijing, China - protocols: - - ipv4 - - https - geocoords: - - 39.985537, 116.343599 -- provider: 北京邮电大学 - url: https://mirrors.bupt.edu.cn/archlinuxcn/ - added_date: 2023-09-15 - location: 北京 - geolocs: - - Beijing, China - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 39.96725, 116.364594 -- provider: NCKU CCNS - url: https://archlinux.ccns.ncku.edu.tw/archlinuxcn/ - comment: Resources provided by NCKU CSIE - location: Taiwan - geolocs: - - Tainan, Taiwan - frequency: 1h - added_date: 2021-06-30 - protocols: - - ipv4 - - http - - https - geocoords: - - 22.9912348, 120.184982 -- provider: xTom (Hong Kong server) - url: https://mirrors.xtom.hk/archlinuxcn/ - comment: Blocking users in mainland China - location: Hong Kong - geolocs: - - Hong Kong - frequency: 7h - added_date: 2017-09-18 - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 22.2793278, 114.1628131 -- provider: xTom (US server) - url: https://mirrors.xtom.us/archlinuxcn/ - comment: Blocking users in mainland China - location: San Jose, CA, United States - geolocs: - - San Jose, California, United States - added_date: 2019-02-19 - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 37.3361905, -121.890583 -- provider: xTom (Netherlands server) - url: https://mirrors.xtom.nl/archlinuxcn/ - comment: Blocking users in mainland China - location: Amsterdam, the Netherlands - geolocs: - - Amsterdam, North Holland, Netherlands - added_date: 2019-09-07 - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 52.3727598, 4.8936041 -- provider: xTom (Germany server) - url: https://mirrors.xtom.de/archlinuxcn/ - comment: Blocking users in mainland China - location: Duesseldorf, Germany - geolocs: - - Dusseldorf, North Rhine-Westphalia, Germany - added_date: 2021-05-07 - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 51.2254018, 6.7763137 -- provider: xTom (Estonia server) - url: https://mirrors.xtom.ee/archlinuxcn/ - comment: Blocking users in mainland China - location: Tallinn, Estonia - geolocs: - - Tallinn, Harju County, Estonia - added_date: 2021-05-27 - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 59.4372155, 24.7453688 -- provider: xTom (Japan server) - url: https://mirrors.xtom.jp/archlinuxcn/ - comment: Blocking users in mainland China - location: Osaka, Japan - geolocs: - - Osaka, Japan - added_date: 2022-01-17 - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 34.6198813, 135.490357 -- provider: xTom (Australia server) - url: https://mirrors.xtom.au/archlinuxcn/ - comment: Blocking users in mainland China - location: Sydney, Australia - geolocs: - - Sydney, Australia - added_date: 2022-07-03 - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - -33.8698439, 151.2082848 -- provider: Open Computing Facility, UC Berkeley - url: https://mirrors.ocf.berkeley.edu/archlinuxcn/ - added_date: 2019-02-19 - location: Berkeley, CA, United States - geolocs: - - Berkeley, California, United States - frequency: 4h - protocols: - - ipv4 - - ipv6 - - http - - https - geocoords: - - 37.8753497, -122.23963364918777 - +--- +archlinuxcn: + - provider: Our main server + url: https://repo.archlinuxcn.org/ + region: Amsterdam, North Holland, Netherlands + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Amsterdam, North Holland, Netherlands + coordinates: + - 52.3730796, 4.8924534 + - provider: 校园网联合镜像站 + url: https://mirrors.cernet.edu.cn/archlinuxcn/ + comment: Redirect to suitable educational mirror based on location + region: 中国 + protocols: + - ipv4 + - ipv6 + - provider: 中国科学技术大学 + url: https://mirrors.ustc.edu.cn/archlinuxcn/ + comment: It is under high load and not recommended for use + region: 安徽合肥 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Hefei, Anhui, China + coordinates: + - 31.8228094, 117.2218033 + - provider: 北京外国语大学 + url: https://mirrors.bfsu.edu.cn/archlinuxcn/ + region: 北京 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Beijing, China + coordinates: + - 40.190632, 116.412144 + - provider: 北京交通大学 + url: https://mirror.bjtu.edu.cn/archlinuxcn/ + region: 北京 + protocols: + - https + - ipv4 + - ipv6 + location: + - Beijing, China + coordinates: + - 40.190632, 116.412144 + - provider: 北京邮电大学 + url: https://mirrors.bupt.edu.cn/archlinuxcn/ + region: 北京 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Beijing, China + coordinates: + - 40.190632, 116.412144 + - provider: 中国科学院软件研究所 + url: https://mirror.iscas.ac.cn/archlinuxcn/ + region: 北京 + protocols: + - https + - ipv4 + location: + - Beijing, China + coordinates: + - 40.190632, 116.412144 + - provider: 北京大学 + url: https://mirrors.pku.edu.cn/archlinuxcn/ + region: 北京 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Beijing, China + coordinates: + - 40.190632, 116.412144 + - provider: 清华大学 + url: https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/ + comment: It is under high load and not recommended for use + region: 北京 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Beijing, China + coordinates: + - 40.190632, 116.412144 + - provider: 重庆大学 + url: https://mirrors.cqu.edu.cn/archlinuxcn/ + region: 重庆 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Chongqing, China + coordinates: + - 30.05518, 107.8748712 + - provider: 重庆邮电大学 + url: https://mirrors.cqupt.edu.cn/archlinuxcn/ + region: 重庆 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Chongqing, China + coordinates: + - 30.05518, 107.8748712 + - provider: 兰州大学 + url: https://mirrors.lzu.edu.cn/archlinuxcn/ + region: 甘肃兰州 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Lanzhou, Gansu, China + coordinates: + - 36.0620781, 103.8318566 + - provider: 南方科技大学 + url: https://mirrors.sustech.edu.cn/archlinuxcn/ + region: 广东深圳 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Shenzhen, Guangdong, China + coordinates: + - 22.5445741, 114.0545429 + - provider: 哈尔滨工业大学 + url: https://mirrors.hit.edu.cn/archlinuxcn/ + region: 黑龙江哈尔滨 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Harbin, Heilongjiang, China + coordinates: + - 45.7593633, 126.6276177 + - provider: 南阳理工学院 + url: https://mirror.nyist.edu.cn/archlinuxcn/ + region: 河南南阳 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Nanyang, Henan, China + coordinates: + - 33.0010496, 112.5292693 + - provider: 荆楚理工学院 + url: https://mirrors.jcut.edu.cn/archlinuxcn/ + region: 湖北荆门 + protocols: + - https + - ipv4 + location: + - Jingmen, Hubei, China + coordinates: + - 31.0375248, 112.1937979 + - provider: 武昌首义学院 + url: https://mirrors.wsyu.edu.cn/archlinuxcn/ + region: 湖北武汉 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Wuhan, Hubei, China + coordinates: + - 30.5951051, 114.2999353 + - provider: 南京工业大学 + url: https://mirrors.njtech.edu.cn/archlinuxcn/ + region: 江苏南京 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Nanjing, Jiangsu, China + coordinates: + - 32.0438284, 118.7788631 + - provider: 南京大学 + url: https://mirrors.nju.edu.cn/archlinuxcn/ + region: 江苏南京 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Nanjing, Jiangsu, China + coordinates: + - 32.0438284, 118.7788631 + - provider: 吉林大学 + url: https://mirrors.jlu.edu.cn/archlinuxcn/ + region: 吉林长春 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Changchun, Jilin, China + coordinates: + - 43.8844201, 125.3180998 + - provider: 沈阳航空航天大学 + url: https://mirrors.sau.edu.cn/archlinuxcn/ + region: 辽宁沈阳 + protocols: + - https + - ipv4 + - ipv6 + location: + - Shenyang, Liaoning, China + coordinates: + - 41.8026095, 123.4279105 + - provider: 西安交通大学 + url: https://mirrors.xjtu.edu.cn/archlinuxcn/ + region: 陕西西安 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Xi'an, Shaanxi, China + coordinates: + - 34.2607713, 108.9423443 + - provider: 上海交通大学 + url: https://mirror.sjtu.edu.cn/archlinux-cn/ + region: 上海 + protocols: + - https + - ipv4 + - ipv6 + location: + - Shanghai, China + coordinates: + - 31.2312707, 121.4700152 + - provider: 上海科技大学 + url: https://mirrors.shanghaitech.edu.cn/archlinuxcn/ + region: 上海 + protocols: + - https + - ipv4 + location: + - Shanghai, China + coordinates: + - 31.2312707, 121.4700152 + - provider: 浙江大学 + url: https://mirrors.zju.edu.cn/archlinuxcn/ + region: 浙江杭州 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Hangzhou, Zhejiang, China + coordinates: + - 30.2489634, 120.2052342 + - provider: 网易 + url: https://mirrors.163.com/archlinux-cn/ + region: 浙江杭州 + protocols: + - http + - https + - ipv4 + location: + - Hangzhou, Zhejiang, China + coordinates: + - 30.2489634, 120.2052342 + - provider: 阿里云 + url: https://mirrors.aliyun.com/archlinuxcn/ + region: Global CDN + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Australia + - Brazil + - Anhui, China + - Beijing, China + - Chongqing, China + - Fujian, China + - Gansu, China + - Guangdong, China + - Guangxi, China + - Guizhou, China + - Hainan, China + - Hebei, China + - Heilongjiang, China + - Henan, China + - Hong Kong, China + - Hubei, China + - Hunan, China + - Inner Mongolia, China + - Jiangsu, China + - Jiangxi, China + - Jilin, China + - Liaoning, China + - Ningxia, China + - Qinghai, China + - Shaanxi, China + - Shandong, China + - Shanghai, China + - Shanxi, China + - Sichuan, China + - Tianjin, China + - Tibet, China + - Xinjiang, China + - Yunnan, China + - Zhejiang, China + - France + - Germany + - India + - Indonesia + - Italy + - Japan + - Kuwait + - Malaysia + - Netherlands + - Nigeria + - Oman + - Pakistan + - Philippines + - Qatar + - Singapore + - South Africa + - South Korea + - Spain + - Sweden + - Thailand + - Turkey + - Ukraine + - United Arab Emirates + - United Kingdom + - United States + coordinates: + - -24.7761086, 134.755 + - -10.3333333, -53.2 + - 32.0, 117.0 + - 40.190632, 116.412144 + - 30.05518, 107.8748712 + - 26.193218, 118.2208721 + - 38.0000001, 101.9999999 + - 23.1357694, 113.1982688 + - 24.0, 109.0 + - 27.0, 107.0 + - 19.2000001, 109.5999999 + - 39.0000001, 116.0 + - 48.0000047, 127.999992 + - 34.0000001, 113.9999999 + - 22.350627, 114.1849161 + - 31.15305035, 112.88064226239663 + - 27.6662087, 111.7487063 + - 43.2443242, 114.3251664 + - 33.0000001, 119.9999999 + - 28.0, 116.0 + - 43.7289674, 126.1997366 + - 41.2374106, 122.9955469 + - 37.0000001, 105.9999999 + - 35.40709525, 95.95211573241954 + - 35.5895959, 109.3013107 + - 36.398987, 118.5055691 + - 31.2312707, 121.4700152 + - 37.0, 112.0 + - 30.5000001, 102.4999999 + - 39.3032619, 117.4163641 + - 29.8556443, 90.8749807 + - 42.4804953, 85.4633464 + - 25.0, 102.0 + - 29.0000001, 119.9999999 + - 46.603354, 1.8883335 + - 51.1638175, 10.4478313 + - 22.3511148, 78.6677428 + - -2.4833826, 117.8902853 + - 42.6384261, 12.674297 + - 36.5748441, 139.2394179 + - 29.2733964, 47.4979476 + - 4.5693754, 102.2656823 + - 52.24764975, 5.541246849406163 + - 9.6000359, 7.9999721 + - 21.0000287, 57.0036901 + - 30.3308401, 71.247499 + - 12.7503486, 122.7312101 + - 25.3336984, 51.2295295 + - 1.357107, 103.8194992 + - -28.8166236, 24.991639 + - 36.638392, 127.6961188 + - 39.3260685, -4.8379791 + - 59.6749712, 14.5208584 + - 14.8971921, 100.83273 + - 38.9597594, 34.9249653 + - 49.4871968, 31.2718321 + - 24.0002488, 53.9994829 + - 54.7023545, -3.2765753 + - 39.7837304, -100.445882 + - provider: 腾讯云 + url: https://mirrors.cloud.tencent.com/archlinuxcn/ + region: Global CDN + protocols: + - http + - https + - ipv4 + location: + - Argentina + - Australia + - Austria + - Bahrain + - Bangladesh + - Belgium + - Brazil + - Cambodia + - Canada + - Chile + - Anhui, China + - Beijing, China + - Chongqing, China + - Fujian, China + - Gansu, China + - Guangdong, China + - Guangxi, China + - Guizhou, China + - Hainan, China + - Hebei, China + - Heilongjiang, China + - Henan, China + - Hong Kong, China + - Hubei, China + - Hunan, China + - Inner Mongolia, China + - Jiangsu, China + - Jiangxi, China + - Jilin, China + - Liaoning, China + - Macau, China + - Ningxia, China + - Qinghai, China + - Shaanxi, China + - Shandong, China + - Shanghai, China + - Shanxi, China + - Sichuan, China + - Tianjin, China + - Tibet, China + - Xinjiang, China + - Yunnan, China + - Zhejiang, China + - Colombia + - Denmark + - Djibouti + - Ecuador + - Egypt + - Finland + - France + - Germany + - India + - Indonesia + - Iraq + - Israel + - Italy + - Japan + - Kenya + - Kuwait + - Kyrgyzstan + - Laos + - Lebanon + - Madagascar + - Malaysia + - Mauritius + - Mexico + - Mongolia + - Myanmar + - Nepal + - Netherlands + - New Zealand + - Oman + - Pakistan + - Peru + - Philippines + - Poland + - Qatar + - Saudi Arabia + - Singapore + - South Africa + - South Korea + - Spain + - Sweden + - Taiwan + - Thailand + - Turkey + - United Arab Emirates + - United Kingdom + - United States + - Vietnam + coordinates: + - -34.9964963, -64.9672817 + - -24.7761086, 134.755 + - 47.59397, 14.12456 + - 26.1551249, 50.5344606 + - 24.4769288, 90.2934413 + - 50.6402809, 4.6667145 + - -10.3333333, -53.2 + - 12.5433216, 104.8144914 + - 61.0666922, -107.991707 + - -31.7613365, -71.3187697 + - 32.0, 117.0 + - 40.190632, 116.412144 + - 30.05518, 107.8748712 + - 26.193218, 118.2208721 + - 38.0000001, 101.9999999 + - 23.1357694, 113.1982688 + - 24.0, 109.0 + - 27.0, 107.0 + - 19.2000001, 109.5999999 + - 39.0000001, 116.0 + - 48.0000047, 127.999992 + - 34.0000001, 113.9999999 + - 22.350627, 114.1849161 + - 31.15305035, 112.88064226239663 + - 27.6662087, 111.7487063 + - 43.2443242, 114.3251664 + - 33.0000001, 119.9999999 + - 28.0, 116.0 + - 43.7289674, 126.1997366 + - 41.2374106, 122.9955469 + - 22.1757605, 113.5514142 + - 37.0000001, 105.9999999 + - 35.40709525, 95.95211573241954 + - 35.5895959, 109.3013107 + - 36.398987, 118.5055691 + - 31.2312707, 121.4700152 + - 37.0, 112.0 + - 30.5000001, 102.4999999 + - 39.3032619, 117.4163641 + - 29.8556443, 90.8749807 + - 42.4804953, 85.4633464 + - 25.0, 102.0 + - 29.0000001, 119.9999999 + - 4.099917, -72.9088133 + - 55.670249, 10.3333283 + - 11.8145966, 42.8453061 + - -1.3397668, -79.3666965 + - 26.2540493, 29.2675469 + - 63.2467777, 25.9209164 + - 46.603354, 1.8883335 + - 51.1638175, 10.4478313 + - 22.3511148, 78.6677428 + - -2.4833826, 117.8902853 + - 33.0955793, 44.1749775 + - 30.8124247, 34.8594762 + - 42.6384261, 12.674297 + - 36.5748441, 139.2394179 + - 1.4419683, 38.4313975 + - 29.2733964, 47.4979476 + - 41.5089324, 74.724091 + - 20.0171109, 103.378253 + - 33.8750629, 35.843409 + - -18.9249604, 46.4416422 + - 4.5693754, 102.2656823 + - -20.2759451, 57.5703566 + - 23.6585116, -102.0077097 + - 46.8250388, 103.8499736 + - 17.1750495, 95.9999652 + - 28.1083929, 84.0917139 + - 52.24764975, 5.541246849406163 + - -41.5000831, 172.8344077 + - 21.0000287, 57.0036901 + - 30.3308401, 71.247499 + - -6.8699697, -75.0458515 + - 12.7503486, 122.7312101 + - 52.215933, 19.134422 + - 25.3336984, 51.2295295 + - 25.6242618, 42.3528328 + - 1.357107, 103.8194992 + - -28.8166236, 24.991639 + - 36.638392, 127.6961188 + - 39.3260685, -4.8379791 + - 59.6749712, 14.5208584 + - 23.9739374, 120.9820179 + - 14.8971921, 100.83273 + - 38.9597594, 34.9249653 + - 24.0002488, 53.9994829 + - 54.7023545, -3.2765753 + - 39.7837304, -100.445882 + - 15.9266657, 107.9650855 + - provider: xTom (香港伺服器) + url: https://mirrors.xtom.hk/archlinuxcn/ + region: 香港 + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Hong Kong, China + coordinates: + - 22.350627, 114.1849161 + - provider: 國立成功大學 + url: https://archlinux.ccns.ncku.edu.tw/archlinuxcn/ + region: 臺灣臺南 + protocols: + - http + - https + - ipv4 + location: + - Tainan, Taiwan + coordinates: + - 22.9912348, 120.184982 + - provider: xTom (Australia server) + url: https://mirrors.xtom.au/archlinuxcn/ + region: Sydney, New South Wales, Australia + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Sydney, New South Wales, Australia + coordinates: + - -33.8698439, 151.2082848 + - provider: xTom (Estonia server) + url: https://mirrors.xtom.ee/archlinuxcn/ + region: Tallinn, Harju, Estonia + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Tallinn, Harju, Estonia + coordinates: + - 59.4372155, 24.7453688 + - provider: xTom (Germany server) + url: https://mirrors.xtom.de/archlinuxcn/ + region: Düsseldorf, North Rhine-Westphalia, Germany + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Düsseldorf, North Rhine-Westphalia, Germany + coordinates: + - 51.2254018, 6.7763137 + - provider: xTom (Japan server) + url: https://mirrors.xtom.jp/archlinuxcn/ + region: Osaka, Japan + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Osaka, Japan + coordinates: + - 34.6198813, 135.490357 + - provider: xTom (Netherlands server) + url: https://mirrors.xtom.nl/archlinuxcn/ + region: Amsterdam, North Holland, Netherlands + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Amsterdam, North Holland, Netherlands + coordinates: + - 52.3730796, 4.8924534 + - provider: University of California, Berkeley + url: https://mirrors.ocf.berkeley.edu/archlinuxcn/ + region: Berkeley, California, United States + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - Berkeley, California, United States + coordinates: + - 37.8708393, -122.272863 + - provider: xTom (United States server) + url: https://mirrors.xtom.us/archlinuxcn/ + region: San Jose, California, United States + protocols: + - http + - https + - ipv4 + - ipv6 + location: + - San Jose, California, United States + coordinates: + - 37.3361663, -121.890591 diff --git a/sequence.py b/sequence.py new file mode 100644 index 0000000..bdc46d3 --- /dev/null +++ b/sequence.py @@ -0,0 +1,85 @@ +#!/usr/bin/python3 + +import sys + +import ruamel.yaml # in python-ruamel-yaml package + +SOURCE_YAML = "mirrors.yaml" + +KEY_ORDER = ( + "provider", + "url", + "comment", + "region", + "protocols", + "location", + "coordinates", +) + +PROVIDER_ORDER = ( + "Our main server", + # --------------------------------------------------------------------------------------------------------------- + "校园网联合镜像站", # China | + "中国科学技术大学", # Anhui | + "北京外国语大学", # Beijing Beijing Foreign Studies University | + "北京交通大学", # Beijing Beijing Jiaotong University | + "北京邮电大学", # Beijing Beijing University of Posts and Telecommunications | + "中国科学院软件研究所", # Beijing Institute of Software, Chinese Academy of Sciences | + "北京大学", # Beijing Peking University | + "清华大学", # Beijing Tsinghua University | + "重庆大学", # Chongqing Chongqing University | + "重庆邮电大学", # Chongqing Chongqing University of Posts and Telecommunications | + "兰州大学", # Gansu | + "南方科技大学", # Guangdong | + "哈尔滨工业大学", # Heilongjiang | + "南阳理工学院", # Henan | + "荆楚理工学院", # Jingmen, Hubei | + "武昌首义学院", # Wuhan, Hubei | + "南京工业大学", # Jiangsu Nanjing Tech University | + "南京大学", # Jiangsu Nanjing University | + "吉林大学", # Jilin | + "沈阳航空航天大学", # Liaoning | + "西安交通大学", # Shaanxi | + "上海交通大学", # Shanghai Shanghai Jiao Tong University | + "上海科技大学", # Shanghai ShanghaiTech University | + "浙江大学", # Zhejiang | + # --------------------------------------------------------------------------------------------------------------- + "网易", # Zhejiang | + "阿里云", # Global CDN Alibaba | + "腾讯云", # Global CDN Tencent | + # --------------------------------------------------------------------------------------------------------------- + "xTom (香港伺服器)", # Hong Kong | + "國立成功大學", # Taiwan | + # --------------------------------------------------------------------------------------------------------------- + "xTom (Australia server)", # Australia | + "xTom (Estonia server)", # Estonia | + "xTom (Germany server)", # Germany | + "xTom (Japan server)", # Japan | + "xTom (Netherlands server)", # Netherlands | + "University of California, Berkeley", # Berkeley, California, United States | + "xTom (United States server)", # San Jose, California, United States | + # --------------------------------------------------------------------------------------------------------------- +) + + +def main(): + mirrors = [] + yaml = ruamel.yaml.YAML() + with open(SOURCE_YAML, encoding="utf-8") as source: + try: + mirrors = yaml.load(source)["archlinuxcn"] + except ruamel.yaml.YAMLError as error: + sys.exit(repr(error)) + for m in mirrors: + for key in reversed(KEY_ORDER): + if key in m: + m.move_to_end(key, last=False) + mirrors.sort(key=lambda m: PROVIDER_ORDER.index(m["provider"])) + with open(SOURCE_YAML, "w", encoding="utf-8") as output: + yaml.explicit_start = True + yaml.indent(mapping=2, sequence=4, offset=2) + yaml.dump({"archlinuxcn": mirrors}, output) + + +if __name__ == "__main__": + main() diff --git a/stats.py b/stats.py new file mode 100644 index 0000000..9b40f3d --- /dev/null +++ b/stats.py @@ -0,0 +1,116 @@ +#!/usr/bin/python3 + +import asyncio +import sys +from email.utils import parsedate_to_datetime + +import httpx # in python-httpx and python-h2 packages +import orjson # in python-orjson package +import ruamel.yaml # in python-ruamel-yaml package + +SOURCE_YAML = "mirrors.yaml" +OUTPUT_JSON = "stats.json" + + +FILES = ( + "lastupdate", + "x86_64/archlinuxcn.db", + "any/archlinuxcn.db", +) + + +async def fetch(client, mirror, file): + provider = mirror["provider"] + url = mirror["url"] + try: + response = await client.head(url + file) + if response.status_code == httpx.codes.OK: + timestamp = parsedate_to_datetime(response.headers.get("Last-Modified")) + return provider, file, timestamp, None + response.raise_for_status() + except (httpx.HTTPError, httpx.InvalidURL) as error: + return provider, file, None, error + + +async def gather(mirrors): + mirrors.append( + { + "provider": "tier0", + "url": "https://repo.archlinuxcn.org/", + } + ) + client = httpx.AsyncClient( + headers={"User-Agent": "curl/8.5.0"}, + http2=True, + timeout=10, + follow_redirects=True, + ) + tasks = [] + for m in mirrors: + for file in FILES: + tasks.append(fetch(client, m, file)) + return await asyncio.gather(*tasks) + + +def process(data, mirrors): + success = {} + failed = {} + for provider, file, timestamp, error in data: + if timestamp is not None: + success[(provider, file)] = timestamp + elif error is not None: + failed[(provider, file)] = error + stats = [] + for m in mirrors: + provider = m["provider"] + if provider == "tier0": + continue + tag = {} + information = {} + for file in FILES: + if (provider, file) in success: + information[file] = str( + success[("tier0", file)] - success[(provider, file)] + ) + tag = "success" + elif (provider, file) in failed: + information[file] = str(failed[(provider, file)]) + tag = "failed" + stats.append( + { + key: key_comment + for key, key_comment in { + "provider": provider, + "comment": m["comment"] if "comment" in m else "", + "url": m["url"], + "region": m["region"], + "protocols": m["protocols"], + "tag": tag, + "information": information, + }.items() + if key != "comment" or key_comment + } + ) + return stats + + +async def main(): + with open(SOURCE_YAML, encoding="utf-8") as source: + try: + mirrors = ruamel.yaml.YAML(typ="safe").load(source)["archlinuxcn"] + except ruamel.yaml.YAMLError as error: + sys.exit(repr(error)) + data = await gather(mirrors) + stats = process(data, mirrors) + with open(OUTPUT_JSON, "w", encoding="utf-8") as output: + print( + orjson.dumps( + {"archlinuxcn": stats}, + option=orjson.OPT_INDENT_2, + ).decode("utf8"), + file=output, + ) + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/update-script b/update-script deleted file mode 100755 index 62f2730..0000000 --- a/update-script +++ /dev/null @@ -1,368 +0,0 @@ -#!/usr/bin/python3 - -import sys -import time -import argparse -import pprint -from urllib.parse import urlparse, urlunparse, quote -import socket -from ipaddress import ip_address, IPv4Address, IPv6Address -from http.client import HTTPConnection, HTTPSConnection -from collections import OrderedDict -import logging -import json - -import yaml # in python-yaml package - - -SOURCE_YAML = "mirrors.yaml" -OUTPUT_README = "README.md" -OUTPUT_MIRRORLIST = "archlinuxcn-mirrorlist" -OUTPUT_GEOJSON = "geolocs.json" - -README_ITEM_TEMPLATE = """```ini -## {title}{comments} -[archlinuxcn] -Server = {url}$arch -``` -""" - -MIRRORLIST_ITEM_TEMPLATE = """\ -## {title} -# Server = {url}$arch -""" - -README_TEMPLATE = """## Arch Linux CN Community repo mirrors list - -Here is a list of public mirrors of our [community repository](https://github.com/archlinuxcn/repo). - -If you interested in making a mirror of our repository, please open an issue or pull request (or contact us at repo@archlinuxcn.org and hope the mail reaches). - -{} - -## Arch Linux CN Community repo debuginfod configuration - -(This is included in our `archlinuxcn-mirrorlist-git` package.) - -```bash -cp -v archlinuxcn.urls /etc/debuginfod/ -``` -""" - -## ordered_load/dump_yaml from https://stackoverflow.com/a/21912744 -def ordered_load_yaml(stream, Loader=yaml.Loader, object_pairs_hook=OrderedDict): - class OrderedLoader(Loader): - pass - def construct_mapping(loader, node): - loader.flatten_mapping(node) - return object_pairs_hook(loader.construct_pairs(node)) - OrderedLoader.add_constructor( - yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG, - construct_mapping) - return yaml.load(stream, OrderedLoader) - -def ordered_dump_yaml(data, stream=None, Dumper=yaml.Dumper, **kwds): - class OrderedDumper(Dumper): - pass - def _dict_representer(dumper, data): - return dumper.represent_mapping( - yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG, - data.items()) - OrderedDumper.add_representer(OrderedDict, _dict_representer) - return yaml.dump(data, stream, OrderedDumper, **kwds) - -def mirror_score(m): - if m['provider'] == 'CDN': - return 1000 - - try: - protocols = m['protocols'] - except KeyError: - return 0 - - score = 0 - if 'https' in protocols: - score += 100 - if 'ipv6' in protocols: - score += 100 - if 'http' in protocols and 'https' not in protocols: - score += 10 - if 'ipv4' in protocols: - score += 10 - - return score - -def mirror_title(item): - title = f'{item["provider"]}' - if "location" in item: - title += f' ({item["location"]})' - if "protocols" in item: - title += " ({})".format(", ".join(item["protocols"])) - return title - - -def mirror_comments(item): - comments = [] - if "added_date" in item: - comments.append(f'## Added: {item["added_date"]}') - if "comment" in item: - comments.append(f"## {item['comment']}") - if comments: - return '\n' + '\n'.join(comments) - else: - return '' - - -def readme_item(item): - return README_ITEM_TEMPLATE.format( - title=mirror_title(item), comments=mirror_comments(item), **item) - - -def gen_readme(mirrors): - with open(OUTPUT_README, 'w') as output: - readme_items = [ - readme_item(item) for item in mirrors - if {'http', 'https'} & set(item['protocols']) - ] - print(README_TEMPLATE.format('\n'.join(readme_items)), file=output) - - -def mirrorlist_item(item): - return MIRRORLIST_ITEM_TEMPLATE.format( - title=mirror_title(item), **item) - - -def gen_mirrorlist(mirrors): - with open(OUTPUT_MIRRORLIST, 'w') as output: - print(f"""\ -## -## Arch Linux CN community repository mirrorlist -## Generated on {time.strftime('%Y-%m-%d')} -## -""", file=output) - - print("\n".join( - mirrorlist_item(item) for item in mirrors - if {'http', 'https'} & set(item['protocols']) - ), file=output, end='') - - -def sub_readme(args): - with open(SOURCE_YAML, 'r') as source: - try: - mirrors = ordered_load_yaml(source) - # mirrors.sort(key=lambda m: -mirror_score(m)) - gen_readme(mirrors) - except yaml.YAMLError as e: - sys.exit(repr(e)) - - -def sub_mirrorlist(args): - with open(SOURCE_YAML, 'r') as source: - try: - mirrors = ordered_load_yaml(source) - # mirrors.sort(key=lambda m: -mirror_score(m)) - gen_mirrorlist(mirrors) - except yaml.YAMLError as e: - sys.exit(repr(e)) - - -def sub_list(args): - with open(SOURCE_YAML, 'r') as source: - try: - mirrors = ordered_load_yaml(source) - pprint.pprint(mirrors) - except yaml.YAMLError as e: - print(e) - sys.exit(1) - - -def try_connect(domain, url, connection): - try: - http = connection(domain, timeout=5) - http.request('GET', url.path, headers={ - 'User-Agent': 'curl/8.0.1', - }) - res = http.getresponse() - if res.status == 200: - return True - except Exception: - return False - - -def try_protocols(mirror): - url = urlparse(mirror['url']) - domain = url.hostname - protocols = [] - print('Accessing "{provider}" at "{domain}": ... '.format( - domain=domain, **mirror), end='', flush=True) - - try: - for (family, _, _, _, sockaddr) in socket.getaddrinfo(domain, 80): - ip = sockaddr[0] - ipa = ip_address(ip) - if ipa.is_global: - if type(ipa) is IPv4Address and 'ipv4' not in protocols: - protocols.append("ipv4") - if type(ipa) is IPv6Address and 'ipv6' not in protocols: - protocols.append("ipv6") - protocols.sort() - except socket.gaierror: - pass - else: - if try_connect(domain, url, HTTPConnection): - protocols.append("http") - url = url._replace(scheme='http') - if try_connect(domain, url, HTTPSConnection): - protocols.append("https") - url = url._replace(scheme='https') - - print(", ".join(protocols)) - mirror['protocols'] = protocols - mirror['url'] = urlunparse(url) - - -def sub_protocols(args): - mirrors = [] - with open(SOURCE_YAML, 'r') as source: - try: - mirrors = ordered_load_yaml(source) - except yaml.YAMLError as e: - print(e) - sys.exit(1) - for m in mirrors: - try_protocols(m) - with open(SOURCE_YAML, "w") as output: - print(ordered_dump_yaml(mirrors, encoding=None, allow_unicode=True, - default_flow_style=False), file=output) - - -def sub_all(args): - sub_protocols(args) - sub_readme(args) - sub_mirrorlist(args) - - -def geoencoding(session, loc): - res = session.get( - 'https://nominatim.openstreetmap.org/search?q=%s&format=jsonv2' % quote(loc), - headers = { - 'User-Agent': 'archlinuxcn/mirrorlist-repo updater/0.1', - }, - ) - geo = res.json()[0] - logging.info('%s is at (%s, %s)', loc, geo['lat'], geo['lon']) - return '%(lat)s, %(lon)s' % geo - - -def sub_geo(args): - mirrors = [] - import requests - session = requests.Session() - with open(SOURCE_YAML, 'r') as source: - try: - mirrors = ordered_load_yaml(source) - except yaml.YAMLError as e: - print(e) - sys.exit(1) - places = {} - for m in mirrors: - locs = m.get('geolocs') - coords = m.get('geocoords') - if locs and coords and len(locs) == len(coords): - places.update(zip(locs, coords)) - for m in mirrors: - locs = m.get('geolocs') - coords = m.get('geocoords') - if not locs: - continue - if locs and coords and len(locs) == len(coords): - continue - coords = [] - for loc in locs: - coord = places.get(loc) - if not coord: - coord = places[loc] = geoencoding(session, loc) - coords.append(coord) - m['geocoords'] = coords - with open(SOURCE_YAML, "w") as output: - print(ordered_dump_yaml(mirrors, encoding=None, allow_unicode=True, - default_flow_style=False), file=output) - - -def sub_geojson(args): - features = [] - geojson = { - "type": "FeatureCollection", - "features": features, - } - with open(SOURCE_YAML, 'r') as source: - try: - mirrors = ordered_load_yaml(source) - # mirrors.sort(key=lambda m: -mirror_score(m)) - except yaml.YAMLError as e: - sys.exit(repr(e)) - - for m in mirrors: - coords = m.get('geocoords') - if not coords: - continue - locs = m['geolocs'] - for loc, coord in zip(locs, coords): - lat, lon = coord.split(', ') - feature = { - "type": "Feature", - "properties": { - "mirror": m['provider'], - "url": m['url'], - "name": loc, - }, - "geometry": { - "type": "Point", - "coordinates": [float(lon), float(lat)], - } - } - features.append(feature) - - with open(OUTPUT_GEOJSON, 'w') as f: - json.dump(geojson, f, ensure_ascii=False) - - -def main(): - parser = argparse.ArgumentParser( - description='update mirrors protocols and generate mirrorlist and README.md') - sub = parser.add_subparsers() - listparser = sub.add_parser('list', help=f'list mirrors in {SOURCE_YAML}') - listparser.set_defaults(func=sub_list) - protparser = sub.add_parser( - 'protocols', help='try access to URLs of the mirrors and update the protocols') - protparser.set_defaults(func=sub_protocols) - readmeparser = sub.add_parser( - 'readme', help=f'generate {OUTPUT_README} from {SOURCE_YAML}') - readmeparser.set_defaults(func=sub_readme) - mirrorlistparser = sub.add_parser( - 'mirrorlist', help=f'generate {OUTPUT_MIRRORLIST} from {SOURCE_YAML}') - mirrorlistparser.set_defaults(func=sub_mirrorlist) - allparser = sub.add_parser('all', help='do all 3 above') - allparser.set_defaults(func=sub_all) - geoparser = sub.add_parser( - 'geo', help=f'update geo coordinates for {SOURCE_YAML}') - geoparser.set_defaults(func=sub_geo) - geojsonparser = sub.add_parser( - 'geojson', help=f'generate {OUTPUT_GEOJSON} for {SOURCE_YAML}') - geojsonparser.set_defaults(func=sub_geojson) - - args = parser.parse_args() - if 'func' not in args: - parser.print_help() - sys.exit(1) - args.func(args) - - -if __name__ == '__main__': - try: - import nicelogger - nicelogger.enable_pretty_logging('INFO') - except ImportError: - pass - main()