├── src ├── pages │ ├── cgit │ │ ├── _head.html │ │ ├── README.md │ │ ├── index.tsx │ │ └── _client.js │ ├── release.module.css │ ├── fancyindex │ │ ├── index.module.css │ │ └── index.tsx │ ├── syncing-status │ │ └── index.tsx │ └── index.module.css ├── components │ ├── DocGlobalOptions │ │ ├── index.module.css │ │ └── index.tsx │ ├── Select │ │ ├── index.module.css │ │ └── index.tsx │ ├── CodeBlockWithVariables │ │ ├── index.module.css │ │ └── index.tsx │ ├── Switch │ │ ├── index.module.css │ │ └── index.tsx │ ├── CliAdvertisement │ │ └── index.tsx │ ├── CliAnimation │ │ └── index.module.css │ ├── SideBar │ │ └── index.module.css │ └── WithVariables.tsx ├── utils │ ├── SharedContext.ts │ └── mirrorUtils.ts ├── theme │ ├── Root.tsx │ ├── MDXComponents.ts │ ├── DocItem │ │ └── Layout │ │ │ ├── styles.module.css │ │ │ └── index.tsx │ └── Footer │ │ └── index.module.css └── css │ └── custom.css ├── static ├── img │ ├── favicon.png │ └── hlug_logo.png └── icons │ ├── issue.svg │ ├── terminal.svg │ ├── disabled.svg │ ├── presyncing.svg │ ├── mail.svg │ ├── contact.svg │ ├── failed.svg │ ├── none.svg │ ├── success.svg │ ├── copy.svg │ ├── download.svg │ ├── paused.svg │ ├── git.svg │ ├── syncing.svg │ ├── newmirror.svg │ ├── image.svg │ ├── link.svg │ ├── news.svg │ ├── help.svg │ ├── domain.svg │ ├── mirrorz.svg │ ├── help2.svg │ └── settings.svg ├── babel.config.js ├── docs ├── assets │ └── git-linux.png ├── kernel.org.md ├── openbsd.md ├── gnu.md ├── linux.git.md ├── CRAN.md ├── linux-stable.git.md ├── ohmyzsh.git.md ├── qemu.git.md ├── manjaro.md ├── gentoo.md ├── llvm-project.git.md ├── llvm-apt.md ├── ros.md ├── F-Droid.md ├── ros2.md ├── buildroot.md ├── github-release.md ├── linux-next.git.md ├── rocky.md ├── ubuntukylin.md ├── alpine.md ├── CTAN.md ├── archlinux.md ├── fedora.md ├── openkylin.md ├── blackarch.md ├── archlinuxcn.md ├── crates.md ├── mxlinux.md ├── kali.md ├── golang.md ├── CPAN.md ├── rustup.md ├── msys2.md ├── termux.md └── linuxmint.md ├── ci ├── .zhlintrc ├── update-pages.sh ├── update-cli-tool.sh ├── README.md ├── gen-releases.py └── test │ └── test-releases-rsync.py ├── i18n ├── en │ ├── docusaurus-theme-classic │ │ ├── footer.json │ │ └── navbar.json │ ├── docusaurus-plugin-content-docs │ │ ├── current.json │ │ └── current │ │ │ ├── openbsd.md │ │ │ ├── linux.git.md │ │ │ ├── linux-next.git.md │ │ │ ├── linux-stable.git.md │ │ │ ├── about-git.md │ │ │ ├── ohmyzsh.git.md │ │ │ ├── qemu.git.md │ │ │ ├── ros.md │ │ │ ├── ros2.md │ │ │ ├── gentoo.md │ │ │ ├── openeuler.md │ │ │ ├── anolis.md │ │ │ ├── archlinux.md │ │ │ ├── buildroot.md │ │ │ ├── alpine.md │ │ │ ├── ubuntukylin.md │ │ │ ├── blackarch.md │ │ │ ├── pypi.md │ │ │ ├── openkylin.md │ │ │ └── archlinuxcn.md │ └── docusaurus-plugin-content-blog │ │ ├── 2023 │ │ ├── 10-24-hustmirror-cn-is-deprecated.md │ │ ├── 09-15-deprecate-hustmirror-cn.md │ │ ├── 06-08-init.md │ │ └── 09-13-alpha.md │ │ ├── 2024 │ │ ├── 03-12-change.md │ │ ├── 02-22-change.md │ │ ├── 03-28-change.md │ │ ├── 11-11-ubuntukylin-cdimge-issue.md │ │ ├── 03-25-migrate-github.md │ │ ├── 03-14-update-cli.md │ │ ├── 06-26-maintain.md │ │ ├── 05-07-public-open.md │ │ └── 02-08-mirrorz.md │ │ ├── 2025 │ │ ├── 10-27-qqgroup.md │ │ ├── 09-05-change.md │ │ └── 09-12-change.md │ │ ├── options.json │ │ └── authors.yml └── zh-Hans │ └── docusaurus-plugin-content-blog │ └── options.json ├── blog ├── 2023 │ ├── 10-24-hustmirror-cn-is-deprecated.md │ ├── 09-15-deprecate-hustmirror-cn.md │ ├── 06-08-init.md │ └── 09-13-alpha.md ├── 2024 │ ├── 03-12-change.md │ ├── 02-22-change.md │ ├── 11-11-ubuntukylin-cdimge-issue.md │ ├── 03-28-change.md │ ├── 05-07-public-open.md │ ├── 03-25-migrate-github.md │ ├── 03-14-update-cli.md │ ├── 06-26-maintain.md │ └── 02-08-mirrorz.md ├── 2025 │ ├── 10-27-qqgroup.md │ ├── 09-05-change.md │ ├── 12-05-change.md │ └── 09-12-change.md └── authors.yml ├── tsconfig.json ├── mirrors.config.js ├── plugin ├── remark │ └── cliAd.js ├── news.js ├── fancyindex.js └── cgit.js ├── .gitignore ├── .github └── workflows │ ├── cli-gen-test.yaml │ ├── lint-all.yaml │ └── lint.yaml ├── sidebars.js ├── LICENSE ├── README.md └── package.json /src/pages/cgit/_head.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /static/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hust-open-atom-club/hust-mirrors/HEAD/static/img/favicon.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')], 3 | }; 4 | -------------------------------------------------------------------------------- /docs/assets/git-linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hust-open-atom-club/hust-mirrors/HEAD/docs/assets/git-linux.png -------------------------------------------------------------------------------- /static/img/hlug_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hust-open-atom-club/hust-mirrors/HEAD/static/img/hlug_logo.png -------------------------------------------------------------------------------- /src/components/DocGlobalOptions/index.module.css: -------------------------------------------------------------------------------- 1 | .domain-desc { 2 | font-style: italic; 3 | font-size: 0.8rem; 4 | margin: 8px 0; 5 | 6 | } 7 | -------------------------------------------------------------------------------- /ci/.zhlintrc: -------------------------------------------------------------------------------- 1 | { 2 | "preset": "default", 3 | "rules": { 4 | "halfwidthPunctuation": "(),。、", 5 | "fullwidthPunctuation": ",:;?!“”‘’" 6 | } 7 | } -------------------------------------------------------------------------------- /i18n/en/docusaurus-theme-classic/footer.json: -------------------------------------------------------------------------------- 1 | { 2 | "copyright": { 3 | "message": "HUSTMirror Team", 4 | "description": "The footer copyright" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-docs/current.json: -------------------------------------------------------------------------------- 1 | { 2 | "version.label": { 3 | "message": "Next", 4 | "description": "The label for version current" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /blog/2024/03-12-change.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 镜像变更通知 3 | authors: chengzi 4 | --- 5 | 6 | 为了更好地利用有限的存储空间,我们对镜像站做出以下调整。 7 | 8 | 删除以下镜像: 9 | 10 | - AOSP 11 | - git-repo 12 | - gcc.git 13 | -------------------------------------------------------------------------------- /blog/2024/02-22-change.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 镜像变更通知 3 | authors: chengzi 4 | --- 5 | 6 | 为了更好地利用有限的存储空间,我们对镜像站做出以下调整。 7 | 8 | 新增以下镜像: 9 | 10 | - termux 11 | 12 | 删除以下镜像: 13 | 14 | - loongson 15 | -------------------------------------------------------------------------------- /blog/2025/10-27-qqgroup.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 镜像站 QQ 群现已创建 3 | authors: yeying-xingchen 4 | --- 5 | 6 | 为了更方便,快捷的反馈镜像站问题,获得镜像站相关技术支持,镜像站 QQ 群现已创建。欢迎广大用户加入。 7 | [点击加入群聊【华科大开源镜像站交流群】](https://qm.qq.com/q/ybvQ0XZXkQ) 8 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // This file is not used in compilation. It is here just for a nice editor experience. 3 | "extends": "@tsconfig/docusaurus/tsconfig.json", 4 | "compilerOptions": { 5 | "baseUrl": "." 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /blog/2023/10-24-hustmirror-cn-is-deprecated.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: hustmirror.cn 已被弃用 3 | authors: mudongliang 4 | --- 5 | 6 | 过去的 **hustmirror.cn** 已被弃用,请大家使用新域名 **mirrors.hust.college**。 7 | 8 | 我们目前正在申请华科校园域名 **mirrors.hust.edu.cn**,申请成功后会尽快上线,敬请期待! 9 | -------------------------------------------------------------------------------- /mirrors.config.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | title: "华中科技大学开源镜像站 | HUST Mirror", 3 | mainTitle: "华中科技大学开源镜像站", 4 | logoTitle: "开源镜像站", 5 | url: "https://mirrors.hust.college", 6 | welcome: "欢迎来到华中科技大学开源镜像站。" 7 | } 8 | 9 | module.exports = config; 10 | -------------------------------------------------------------------------------- /plugin/remark/cliAd.js: -------------------------------------------------------------------------------- 1 | /** @type {import("unified").Plugin} */ 2 | const plugin = (_) => { 3 | return (ast, f) => { 4 | ast.children.unshift({ 5 | type: "mdxJsxFlowElement", 6 | name: "CliAdvertisement", 7 | }) 8 | } 9 | } 10 | 11 | module.exports = plugin; 12 | 13 | -------------------------------------------------------------------------------- /src/utils/SharedContext.ts: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export type SharedState = { 4 | https: boolean; 5 | domain: string; 6 | setHttps: (v: boolean) => void; 7 | setDomain: (v: string) => void; 8 | } 9 | 10 | export default React.createContext(undefined); 11 | -------------------------------------------------------------------------------- /blog/2023/09-15-deprecate-hustmirror-cn.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 关于hustmirror.cn即将弃用的通知 3 | authors: mudongliang 4 | --- 5 | 6 | 随着内测站点已经正式上线,并使用了新域名 mirrors.hust.college, 7 | 过去的 hustmirror.cn 即将被弃用。 8 | 9 | 虽然我们依然会维持一段时间对 hustmirror.cn 域名解析,和网站问题的维护, 10 | 但是请尽快迁移到新域名 **mirrors.hust.college**。 11 | -------------------------------------------------------------------------------- /src/components/Select/index.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: inline-block; 3 | width: 200px; 4 | } 5 | 6 | .label{ 7 | margin: 16px 24px 16px 0; 8 | display: inline-block; 9 | } 10 | 11 | .label-top { 12 | margin: 8px 0; 13 | display: block; 14 | font-weight: bold; 15 | } 16 | -------------------------------------------------------------------------------- /blog/2024/11-11-ubuntukylin-cdimge-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ubuntukylin-cdimage 同步问题 3 | authors: mudongliang 4 | --- 5 | 6 | 由于域名 `cdimage.ubuntukylin.com` 失效,ubuntukylin-cdimage 镜像无法正常同步。因此,本镜像站暂停 ubuntukylin-cdimage 镜像的同步工作,直到社区给予新的同步地址与方式。请大家到 ubuntukylin 社区下载最新版本的镜像文件。 7 | 8 | 对此造成的不便,我们深表歉意,并感谢您的理解和耐心。 9 | -------------------------------------------------------------------------------- /blog/2024/03-28-change.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 镜像变更通知 3 | authors: chengzi 4 | --- 5 | 6 | 为了更好地利用有限的存储空间,我们对镜像站做出以下调整。 7 | 8 | 由于新版树莓派 debian 完全采用 debian 软件源,我们删除以下镜像: 9 | 10 | - raspbian 11 | - raspberrypi 12 | - raspbian-addons 13 | 14 | 同时,debian 官方源已经包含 non-free 软件,我们删除以下镜像: 15 | 16 | - debian-nonfree 17 | -------------------------------------------------------------------------------- /ci/update-pages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | # Usage: update-pages.sh 3 | 4 | set -e 5 | 6 | src_dir="$1" 7 | obj_dir="$2" 8 | 9 | tag='origin/prod' 10 | 11 | cd "$src_dir" || exit 12 | 13 | git fetch --all 14 | git checkout $tag 15 | yarn && yarn build 16 | cp -rf ./build/* "$obj_dir" 17 | -------------------------------------------------------------------------------- /ci/update-cli-tool.sh: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | # Usage: update-cli-tool.sh 3 | 4 | set -e 5 | 6 | src_dir="$1" 7 | obj_dir="$2" 8 | 9 | tag='origin/prod' 10 | 11 | cd "$src_dir" || exit 12 | 13 | git fetch --all 14 | git checkout $tag 15 | make 16 | cp -f ./output/hustmirror-cli "$obj_dir"/get 17 | 18 | -------------------------------------------------------------------------------- /blog/2025/09-05-change.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 镜像变更通知 3 | authors: m0rtzz 4 | --- 5 | 6 | 由于近期磁盘空间不足的问题,我们的镜像站经历了一段时间的同步异常。为了解决这一问题,并更有效地利用有限的存储资源,我们对镜像站进行了以下调整。 7 | 8 | 9 | 1. 删除以下镜像: 10 | - OpenBSD 11 | - ubuntukylin-cdimage 12 | 2. 取消对 anolis 的 23.1 版本的同步。 13 | 14 | 我们将持续优化镜像站的内容,以确保提供最相关和最常用的镜像。对于此次变更带来的不便,我们深表歉意,并感谢您的理解与支持。 15 | -------------------------------------------------------------------------------- /src/pages/cgit/README.md: -------------------------------------------------------------------------------- 1 | # Config Sample 2 | 3 | ``` 4 | virtual-root=/git 5 | 6 | head-include= 7 | header= 8 | footer= 9 | 10 | snapshots=tar.gz zip 11 | 12 | enable-blame=1 13 | max-stats=week 14 | 15 | source-filter=/usr/lib/cgit/filters/syntax-highlighting.sh 16 | ``` 17 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2024/03-12-change.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Mirror change notice 3 | authors: chengzi 4 | --- 5 | 6 | In order to make better use of the limited storage space, we have made the following adjustments to the mirror site. 7 | 8 | The following mirrors will be removed: 9 | 10 | - AOSP 11 | - git-repo 12 | - gcc.git 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | /generated_scripts 8 | 9 | # Generated files 10 | .docusaurus 11 | .cache-loader 12 | 13 | # Misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | 24 | -------------------------------------------------------------------------------- /blog/2025/12-05-change.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 镜像变更通知 3 | authors: paulkm 4 | --- 5 | 6 | 为更好地满足用户需求并优化资源分配,我们对镜像站的同步策略进行了如下调整。 7 | 8 | 1. 删除了以下镜像: 9 | - Anolis 10 | 11 | 2. 新增同步: 12 | - 新增了部分 github-releases 的同步,目前开启了 `rustdesk/rustdesk`, `ip7z/7zip` 和 `llvm/llvm-project` 项目的同步 13 | - 新增了 radxa-deb 的同步 14 | 15 | 我们将持续关注镜像服务的稳定性和资源使用效率,为您提供更高质量的访问体验。感谢大家一直以来的支持与理解。 16 | -------------------------------------------------------------------------------- /static/icons/issue.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /blog/2023/06-08-init.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 世界,你好! 3 | authors: chengzi 4 | --- 5 | 6 | 经过开发与测试,全新的华中科技大学开源软件镜像站开始进行测试! 7 | 8 | 技术选型上,我们采用清华大学的 tunasync 作为同步管理器, 9 | 使用 Facebook 的 Docusaurus 的静态站点生成框架进行网站 web 页面搭建。 10 | 11 | 我们使用了一台 Dell PowerEdge R740 服务器进行部署,初步计划同步 12 | Arch Linux,Debian 和 Ubuntu 用于俱乐部内部测试。 13 | 14 | 镜像站源码已经开源,目前我们正在计划采用 POSIX Shell 编写一套一键换 15 | 源脚本,测试稳定后会和当前站点一起部署。 16 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2024/02-22-change.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Mirror change notice 3 | authors: chengzi 4 | --- 5 | 6 | In order to make better use of the limited storage space, we have made the following adjustments to the mirror station. 7 | 8 | The following mirrors have been added: 9 | 10 | - termux 11 | 12 | The following mirrors have been removed: 13 | 14 | - loongson -------------------------------------------------------------------------------- /.github/workflows/cli-gen-test.yaml: -------------------------------------------------------------------------------- 1 | name: Test CLI Generation 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - '**/*' 7 | workflow_dispatch: 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v5 15 | 16 | - name: Test generation 17 | run: python scripts/parser.py -t -v 18 | -------------------------------------------------------------------------------- /static/icons/terminal.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /blog/2025/09-12-change.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 镜像变更通知 3 | authors: m0rtzz 4 | --- 5 | 6 | 为更好地满足用户需求并优化资源分配,我们对镜像站的同步策略进行了如下调整。 7 | 8 | 1. 恢复同步: 9 | - 已恢复所有 cgit 仓库的同步,包括 linux.git 等重要代码仓库。 10 | - 重新同步 OpenBSD 镜像,继续提供该项目的资源访问服务。 11 | 12 | 2. 调整同步范围: 13 | - 对 Anolis 镜像的同步策略进行优化,今后将仅同步每个大版本下的最新两个小版本。 14 | - 基于该策略,本次已取消对 Anolis 8.2、8.4、8.6 及 8.8 的同步。 15 | 16 | 我们将持续关注镜像服务的稳定性和资源使用效率,为您提供更高质量的访问体验。感谢大家一直以来的支持与理解。 17 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2025/10-27-qqgroup.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Mirror Site QQ Group Now Available 3 | authors: yeying-xingchen 4 | --- 5 | 6 | To enable more convenient and prompt feedback regarding mirror site issues and to receive related technical support, a QQ group for the mirror site has now been established. All users are warmly welcome to join! 7 | [Click here to join the group](https://qm.qq.com/q/adEdrCKjHa) 8 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": { 3 | "message": "Blog", 4 | "description": "The title for the blog used in SEO" 5 | }, 6 | "description": { 7 | "message": "Blog", 8 | "description": "The description for the blog used in SEO" 9 | }, 10 | "sidebar.title": { 11 | "message": "Recent posts", 12 | "description": "The label for the left sidebar" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /i18n/zh-Hans/docusaurus-plugin-content-blog/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": { 3 | "message": "动态", 4 | "description": "The title for the blog used in SEO" 5 | }, 6 | "description": { 7 | "message": "开源镜像站最新动态", 8 | "description": "The description for the blog used in SEO" 9 | }, 10 | "sidebar.title": { 11 | "message": "近期新帖", 12 | "description": "The label for the left sidebar" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /blog/2024/05-07-public-open.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 互联网朋友,你们好! 3 | authors: chengzi 4 | --- 5 | 6 | 从最初的 nginx autoindex,到如今的完整的网页服务;从最初的十几人内部使用,到如今的公开服务; 7 | 从最初的四五个镜像同步,到如今的数十个镜像同步;从最初的几百 G 的存储,到如今的数十 TB 的存储。 8 | 9 | 经过长达一年的测试、完善,我们的镜像站终于正式对外开放了!:joy: 10 | 11 | 现在,我们的镜像站终于成为了一个真正意义上的 “镜像站”,为广大互联网用户提供了更加便捷的服务。 12 | 你可以在全世界的任何地方访问我们的镜像站,下载你所需要的软件包、镜像、源码仓库等等。 13 | 14 | **同时,我们弃用了旧域名 mirrors.hust.college,仅保留了 mirrors.hust.edu.cn 的服务,请大家注意更新。** 15 | 16 | -------------------------------------------------------------------------------- /docs/kernel.org.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: kernel.org 3 | title: kernel.org 镜像使用帮助 4 | type: repo 5 | --- 6 | 7 | ## kernel.org 简介 8 | kernel.org 是 Linux 内核官方主站,托管着内核源码(如 tarball 归档、Git 仓库)、补丁、签名文件、文档等关键资源。 9 | 10 | ## 镜像仓库介绍 11 | 12 | 该镜像站点镜像了 [https://www.kernel.org/pub/](https://www.kernel.org/pub/)。 13 | 14 | 15 | ## 使用 16 | 在使用时,将链接里的 `https://www.kernel.org/pub/` 替换为以下内容: 17 | ```url varcode 18 | ${_http}://${_domain}/kernel.org/ 19 | ``` 20 | 即可使用。 21 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2023/10-24-hustmirror-cn-is-deprecated.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Notice: hustmirror.cn is already deprecated" 3 | authors: mudongliang 4 | --- 5 | 6 | The old **hustmirror.cn** has been deprecated. Please use the new domain name **mirrors.hust.college**. 7 | 8 | We are currently applying for HUST campus domain name **mirrors.hust.edu.cn**. It will be launched as soon as possible after successful application. Please look forward to it! 9 | -------------------------------------------------------------------------------- /static/icons/disabled.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /static/icons/presyncing.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /blog/2024/03-25-migrate-github.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 镜像站源码迁移到 GitHub 3 | authors: chengzi 4 | --- 5 | 6 | 我们目前已经将镜像站迁移到 GitHub,以便更好地支持开源社区。 7 | 8 | - 前端代码:[https://github.com/hust-open-atom-club/hust-mirrors](https://github.com/hust-open-atom-club/hust-mirrors) 9 | - 同步管理器 (tunasync):[https://github.com/hust-open-atom-club/tunasync](https://github.com/hust-open-atom-club/tunasync) 10 | - CLI 工具:[https://github.com/hust-open-atom-club/hustmirror-cli](https://github.com/hust-open-atom-club/hustmirror-cli) 11 | -------------------------------------------------------------------------------- /blog/2024/03-14-update-cli.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: hustmirror-cli v1.1 发布 3 | authors: chengzi 4 | --- 5 | 6 | hustmirror-cli v1.1 已经发布, 7 | 新版本增加了对一些发行版本和软件源的支持。 8 | 9 | 最新版本的 hustmirror-cli 已经更新到镜像站。 10 | 对于已经安装的用户,请使用 `hustmirror-cli update` 命令更新到最新版本。 11 | 12 | 13 | 14 | 15 | ## 该版本支持的发行版本和软件源 16 | 17 | - anolis 18 | - archlinux 19 | - blackarch 20 | - crates 21 | - debian 22 | - deepin 23 | - kali 24 | - ohmyzsh 25 | - openeuler 26 | - openkylin 27 | - pypi 28 | - rustup 29 | - ubuntu 30 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2023/09-15-deprecate-hustmirror-cn.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Notice: hustmirror.cn will be deprecated" 3 | --- 4 | 5 | As the internal testing site has officially gone live and is now using the new domain mirrors.hust.college, the previous hustmirror.cn will soon be deprecated. 6 | 7 | While we will continue to maintain domain resolution for hustmirror.cn and address website issues for a period, we kindly request you to migrate to the new domain **mirrors.hust.college** as soon as possible. 8 | -------------------------------------------------------------------------------- /static/icons/mail.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /blog/2024/06-26-maintain.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 服务维护通知 3 | authors: chengzi 4 | --- 5 | 6 | 从6月26日开始,持续到7月10日,我们将对镜像站的存储空间进行大规模调整, 7 | 主要包括磁盘阵列的扩容和数据迁移。 8 | 期间可能会造成服务不稳定,部分镜像源可能会更新不及时, 9 | 甚至出现无法访问的情况,请各位用户提前做好准备,更换其他备用源。 10 | 11 | 我们将尽快完成维护工作,给大家带来的不便敬请谅解。 12 | 13 | 14 | 15 | 在这期间可能受影响的镜像源有: 16 | 17 | - pypi 18 | - deepin 19 | - deppin-cd 20 | - openkylin-cdimage 21 | - anolis 22 | - ubuntukylin 23 | - ubuntukylin-cdimage 24 | - virtualbox 25 | - buildroot 26 | - gnu 27 | - CPAN 28 | - alpine 29 | - crates.io-index 30 | - crates 31 | - Rustup 32 | 33 | -------------------------------------------------------------------------------- /ci/README.md: -------------------------------------------------------------------------------- 1 | # Hust Mirror CI/CD 2 | 3 | ## Crontab configuration 4 | Use `crontab -e` to configure crontab. 5 | ``` 6 | 0 4 * * * PATH=/path/to/nodejs-bin:$PATH /path/to/ci/update-pages.sh /path/to/mirror-src /path/to/mirror-srv-dir 7 | */30 * * * * /path/to/ci/gen-releases.py /path/to/mirror-data1 [/path/to/mirror-data2 ...] path/to/mirror-srv-dir/releases.json 8 | 0 4 * * * path/to/ci/update-cli-tool.sh /path/to/mirror-cli-src /path/to/mirror-srv-dir/get 9 | ``` 10 | 11 | ### Substitution 12 | Replace all path begin with /path/to to real absolute path. 13 | 14 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2024/03-28-change.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Mirror change notice 3 | authors: chengzi 4 | --- 5 | 6 | In order to make better use of limited storage space, we make the following adjustments to the mirror site. 7 | 8 | Since the new version of Raspberry Pi Debian completely uses the Debian software source, we delete the following mirrors. 9 | 10 | - raspbian 11 | - raspberrypi 12 | - raspbian-addons 13 | 14 | At the same time, the official Debian repository already contains non-free software. We delete the following mirrors. 15 | 16 | - debian-nonfree 17 | -------------------------------------------------------------------------------- /src/theme/Root.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import RootContext from '@site/src/utils/SharedContext' 3 | import { useDomainMetas } from '../utils/mirrorUtils'; 4 | 5 | 6 | export default function Root({ children }) { 7 | 8 | const domains = useDomainMetas(); 9 | 10 | const [https, setHttps] = React.useState(true); 11 | const [domain, setDomain] = React.useState(domains[0] ? domains[0].domain : 'path/to/mirror'); 12 | 13 | return 19 | {children} 20 | 21 | } 22 | -------------------------------------------------------------------------------- /docs/openbsd.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: OpenBSD 3 | title: OpenBSD 软件仓库镜像使用帮助 4 | cname: 'openbsd' 5 | --- 6 | 7 | ## OpenBSD 简介 8 | OpenBSD 项目致力于创建一个自由的多平台的以 4.4BSD Lite 为基础的类 UNIX 操作系统,强调便携性、标准化、准确性、生产安全性以及完整的密码系统。 9 | 10 | ## 手动设置 11 | 将 `/etc/installurl` 文件修改为以下内容: 12 | ```url varcode 13 | ${_http}://${_domain}/openbsd/ 14 | ``` 15 | 16 | ## 快速设置 17 | 运行以下命令: 18 | ```shell varcode 19 | echo '${_http}://${_domain}/openbsd/' | sudo tee /etc/installurl 20 | ``` 21 | 22 | ## 引用 23 | 1. [使用帮助 - MirrorZ Projec](https://help.mirrors.cernet.edu.cn/OpenBSD/) 24 | 2. [项目简介 - Openbsd.org](https://www.openbsd.org/index.html) 25 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-theme-classic/navbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": { 3 | "message": "HUST Mirror", 4 | "description": "The title in the navbar" 5 | }, 6 | "logo.alt": { 7 | "message": "HUST Mirror", 8 | "description": "The alt text of navbar logo" 9 | }, 10 | "item.label.帮助": { 11 | "message": "Help", 12 | "description": "Navbar item with label 帮助" 13 | }, 14 | "item.label.动态": { 15 | "message": "News", 16 | "description": "Navbar item with label 动态" 17 | }, 18 | "item.label.GitHub": { 19 | "message": "GitHub", 20 | "description": "Navbar item with label Gitee" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /static/icons/contact.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/icons/failed.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2024/11-11-ubuntukylin-cdimge-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Synchronization Issue with ubuntukylin-cdimage 3 | authors: mudongliang 4 | --- 5 | 6 | Due to the expiration of the domain name `cdimage.ubuntukylin.com`, the ubuntukylin-cdimage mirrors are unable to synchronize properly. As a result, our mirror site is suspending the synchronization of ubuntukylin-cdimage mirrors until the community provides a new synchronization address and method. Please download the latest version of the mirror files from the ubuntukylin community. 7 | 8 | We deeply apologize for the inconvenience caused and thank you for your understanding and patience. 9 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2024/03-25-migrate-github.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Migrate the Source Code of the Mirror Site to GitHub 3 | authors: chengzi 4 | --- 5 | 6 | We have already migrated the mirror site to GitHub to better support the open-source community. 7 | 8 | - Front-end code:[https://github.com/hust-open-atom-club/hust-mirrors](https://github.com/hust-open-atom-club/hust-mirrors) 9 | - Synchronization manager (tunasync) (tunasync):[https://github.com/hust-open-atom-club/tunasync](https://github.com/hust-open-atom-club/tunasync) 10 | - CLI tool:[https://github.com/hust-open-atom-club/hustmirror-cli](https://github.com/hust-open-atom-club/hustmirror-cli) 11 | -------------------------------------------------------------------------------- /plugin/news.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | const fs = require('fs/promises') 3 | var crypto = require('crypto'); 4 | 5 | /** @type {import('@docusaurus/types').Plugin} */ 6 | const fancyindexPlugin = { 7 | name: 'news-meta', 8 | async allContentLoaded({ allContent, actions }) { 9 | const d = allContent['docusaurus-plugin-content-blog'].default 10 | // @ts-ignore 11 | .blogPosts.map((/** @type any }} */ t) => ({ 12 | id: t.id, 13 | title: t.metadata.title, 14 | date: t.metadata.date, 15 | link: t.metadata.permalink, 16 | })); 17 | actions.setGlobalData(d); 18 | 19 | } 20 | } 21 | 22 | module.exports = () => fancyindexPlugin; 23 | -------------------------------------------------------------------------------- /static/icons/none.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/theme/MDXComponents.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // Import the original mapper 3 | import MDXComponents from '@theme-original/MDXComponents'; 4 | import CodeBlockWithVariables from '../components/CodeBlockWithVariables'; 5 | import CliAdvertisement from '../components/CliAdvertisement'; 6 | import WithVariables, { SiteLink } from '../components/WithVariables'; 7 | 8 | export default { 9 | // Re-use the default mapping 10 | ...MDXComponents, 11 | // Map the "" tag to our Highlight component 12 | // `Highlight` will receive all props that were passed to `` in MDX 13 | CodeBlockWithVariables, 14 | CliAdvertisement, 15 | WithVariables, 16 | SiteLink 17 | }; 18 | -------------------------------------------------------------------------------- /docs/gnu.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: GNU 软件源码镜像使用帮助 3 | sidebar_label: GNU 4 | --- 5 | 6 | ## GNU 简介 7 | GNU 于1983年由 Richard Stallman(rms)发起,意在为所有软件用户能够自由控制自己的计算而构建一款由大家共同努力开发而成的操作系统。 8 | GNU 的基本目标和一贯目标是提供一个和 Unix 兼容的 100% 自由软件的操作系统。不是 95%、也不是 99.5%、而是 100% 自由。 9 | 这个系统的名字叫 GNU,是 GNU's Not Unix 的首字母递归缩写 —- 这是 Unix 的技术思想致敬的一种方法,同时表现出 GNU 有所不同。 10 | 11 | 从技术上说,GNU 很像 Unix。但是它不同于 Unix,GNU 给予其用户自由。 12 | 13 | ## 文件说明 14 | 15 | 该镜像站 `gnu/` 目录下存放了 GNU 的源码、文档、许可证等文件,在需要 GNU 组件(例如 bash、coreutils、gcc 等)源码时,可以从这里下载。 16 | 17 | 可以点击下方按钮查看文件列表。 18 | 19 | 20 | 21 | 22 | 23 | ## 引用 24 | 1. [gnu 中文简介](https://www.gnu.org/gnu/about-gnu.zh-cn.html) 25 | -------------------------------------------------------------------------------- /src/components/CodeBlockWithVariables/index.module.css: -------------------------------------------------------------------------------- 1 | .panel { 2 | padding: 4px 16px; 3 | box-shadow: var(--ifm-global-shadow-lw); 4 | border-radius: var(--ifm-code-border-radius); 5 | /* make it overlap with code block */ 6 | margin-bottom: -8px; 7 | /* NOTE: use hardcoded color to 8 | * make sure the background color 9 | * is same as prismjs code block. 10 | */ 11 | background-color: #f6f8fa; 12 | } 13 | 14 | .panel + div { 15 | border-radius: 0 0 16 | var(--ifm-code-border-radius) 17 | var(--ifm-code-border-radius); 18 | border-top: 1px solid var(--ifm-color-emphasis-300); 19 | } 20 | 21 | [data-theme='dark'] .panel { 22 | background-color: #282A36; 23 | } 24 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-docs/current/openbsd.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: OpenBSD 3 | title: OpenBSD Mirror Usage Guide 4 | --- 5 | 6 | ## Introduction to OpenBSD 7 | The OpenBSD project produces a FREE, multi-platform 4.4BSD-based UNIX-like operating system. 8 | 9 | ## Manual Configuration 10 | Edit the `/etc/installurl` file to contain the following: 11 | ```url varcode 12 | ${_http}://${_domain}/openbsd/ 13 | ``` 14 | 15 | ## Quick Setup 16 | Run the following command: 17 | ```bash varcode 18 | echo '${_http}://${_domain}/openbsd/' | sudo tee /etc/installurl 19 | ``` 20 | 21 | ## References 22 | 1. [Usage Guide-MirrorZ Project](https://help.mirrors.cernet.edu.cn/OpenBSD/) 23 | 2. [openbsd.org](https://www.openbsd.org/index.html) 24 | -------------------------------------------------------------------------------- /src/pages/cgit/index.tsx: -------------------------------------------------------------------------------- 1 | import Layout from "@theme/Layout"; 2 | import clsx from "clsx"; 3 | import React, { useEffect } from "react"; 4 | import styles from './index.module.css' 5 | import { useDocMetas, useMirrorMetas } from "@site/src/utils/mirrorUtils"; 6 | 7 | export default function FileIndexPage() { 8 | const mirrorMeta = JSON.stringify(useMirrorMetas()); 9 | const helpMeta = JSON.stringify(useDocMetas()); 10 | 11 | const clientScript = ` 12 | window.MIRROR_METAS = ${mirrorMeta}; 13 | window.HELP_METAS = ${helpMeta}; 14 | `; 15 | 16 | return 17 | 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/pages/release.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | margin: 0px auto; 3 | padding: 32px; 4 | width: 100%; 5 | max-width: 640px; 6 | } 7 | 8 | 9 | .header-container { 10 | margin: 0 auto; 11 | } 12 | 13 | .header-container h1 { 14 | font-size: 3em; 15 | } 16 | 17 | .result { 18 | margin: 32px 0; 19 | } 20 | 21 | .result h4 svg { 22 | height: 1em; 23 | width: 1em; 24 | vertical-align: middle; 25 | margin-right: 8px; 26 | } 27 | 28 | .result h4 { 29 | display: flex; 30 | font-size: 1.2em; 31 | flex-direction: row; 32 | justify-content: space-between; 33 | align-items: center; 34 | } 35 | 36 | .release-banner { 37 | padding-left: 32px !important; 38 | padding-right: 32px !important; 39 | text-align: center; 40 | } 41 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2024/03-14-update-cli.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: hustmirror-cli v1.1 release 3 | authors: chengzi 4 | --- 5 | 6 | hustmirror-cli v1.1 has been released. 7 | 8 | The new version adds support for some distributions and software sources. 9 | The latest version of hustmirror-cli has been updated to the mirror site. For users who have already installed it, please use the hustmirror-cli update command to update to the latest version. 10 | 11 | 12 | 13 | ## Distributions and software sources supported by this version 14 | 15 | - anolis 16 | - archlinux 17 | - blackarch 18 | - crates 19 | - debian 20 | - deepin 21 | - kali 22 | - ohmyzsh 23 | - openeuler 24 | - openkylin 25 | - pypi 26 | - rustup 27 | - ubuntu 28 | -------------------------------------------------------------------------------- /static/icons/success.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/theme/DocItem/Layout/styles.module.css: -------------------------------------------------------------------------------- 1 | .docItemContainer header + *, 2 | .docItemContainer article > *:first-child { 3 | margin-top: 0; 4 | } 5 | 6 | .global-option { 7 | position: sticky; 8 | top: calc(var(--ifm-navbar-height) + 1.5rem); 9 | background: var(--ifm-background-surface-color); 10 | z-index: 15; 11 | } 12 | 13 | [data-theme="dark"] .global-option { 14 | background: var(--ifm-background-color); 15 | } 16 | 17 | .global-option + * { 18 | position: sticky; 19 | top: calc(var(--ifm-navbar-height) + 1rem + 200px) !important; 20 | max-height: calc(100vh - (var(--ifm-navbar-height) + 2rem + 240px )) !important; 21 | } 22 | 23 | .global-option-mobile { 24 | margin: 32px 0; 25 | } 26 | 27 | @media (min-width: 997px) { 28 | .docItemCol { 29 | max-width: 75% !important; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/components/Switch/index.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: inline-flex; 3 | flex-direction: column; 4 | justify-content: center; 5 | width: 58px; 6 | height: 24px; 7 | border: var(--ifm-color-primary) 3px solid; 8 | border-radius: 12px; 9 | transition: background 0.6s; 10 | } 11 | 12 | 13 | .container-open { 14 | background: var(--ifm-color-primary); 15 | } 16 | 17 | .slider { 18 | background: var(--ifm-color-primary); 19 | width: 14px; 20 | height: 14px; 21 | border-radius: 9px; 22 | margin-left: 2.5px; 23 | transition: all 0.6s; 24 | } 25 | 26 | .slider-open { 27 | background: white; 28 | margin-left: 36px; 29 | } 30 | 31 | .label { 32 | margin: 16px 24px 16px 0; 33 | display: inline-block; 34 | } 35 | 36 | .label-top { 37 | margin: 8px 0; 38 | display: block; 39 | font-weight: bold; 40 | } 41 | -------------------------------------------------------------------------------- /blog/2023/09-13-alpha.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 华中科技大学开源镜像站上线内测 3 | authors: mudongliang 4 | --- 5 | 6 | 经过三个多月的内部的开发、部署、测试试运行,9月13日,经过三个多月的内部试运行,华中科技大学开源镜像站以 [https://mirrors.hust.college](https://mirrors.hust.college) 上线内测。开源镜像站底层服务器采用鲲鹏 920 处理器,2*48 核心,20T 硬盘。目前,开源镜像站已同步镜像源 27 个,数据量为 13TB,提供 HTTP,HTTPS 和 RSYNC 三种访问方式。 7 | 8 | 9 | 10 | ## 开源代码 11 | 我们目前已经将镜像站所使用的前端和后端代码公开在 Gitee 组织 (https://gitee.com/dzm91_hust/) 下,欢迎大家 star🌟! 12 | 13 | - 前端代码:[https://gitee.com/dzm91_hust/hust-mirrors](https://gitee.com/dzm91_hust/hust-mirrors) 14 | - 后端代码:[https://gitee.com/dzm91_hust/tunasync](https://gitee.com/dzm91_hust/tunasync) 15 | - 快速换源工具:[https://gitee.com/dzm91_hust/hustmirror-cli](https://gitee.com/dzm91_hust/hustmirror-cli) 16 | 17 | ## 想要反馈意见? 18 | 镜像请求、故障报告、以及其他您对本开源镜像站的改进意见都可以在我们提供的仓库 issues 里进行反馈。或者,大家可以给我们发送邮件至 mirror_support@hust.edu.cn。期待大家的声音! 19 | 20 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2025/09-05-change.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Mirror Repository Change Notification 3 | authors: m0rtzz 4 | --- 5 | 6 | Due to recent disk space shortages, our mirror repository experienced synchronization issues for a period of time. To resolve this problem and utilize our limited storage resources more efficiently, we have implemented the following adjustments: 7 | 8 | 1. Removed the following mirrors: 9 | - OpenBSD 10 | - ubuntukylin-cdimage 11 | 2. Discontinued synchronization for Anolis OS version 23.1. 12 | 13 | We remain committed to continuously optimizing the content of our mirror repository to ensure the availability of the most relevant and widely used distributions and resources. We sincerely apologize for any inconvenience caused by these changes and greatly appreciate your understanding and ongoing support. 14 | -------------------------------------------------------------------------------- /static/icons/copy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-docs/current/linux.git.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Linux Mainline Git 3 | sidebar_label: Linux Mainline 4 | cname: 'linux.git' 5 | --- 6 | 7 | 1. Clone the `Linux` source code by running: 8 | 9 | ```bash varcode 10 | git clone ${_http}://${_domain}/git/linux.git 11 | ``` 12 | 13 | 14 | 1. To add `mirror` to an existing code repository, in an existing repository, run either of the following commands: 15 | 16 | ```bash varcode 17 | git remote add mirror ${_http}://${_domain}/git/linux.git 18 | ``` 19 | 20 | or 21 | 22 | ```bash varcode 23 | git remote set-url origin ${_http}://${_domain}/git/linux.git 24 | ``` 25 | 26 | This will set the default upstream to the current software mirror site. 27 | 28 | ## References 29 | 30 | [^1] [MirrorZ](https://mirrors.cernet.edu.cn/about) 31 | 32 | [^2] [Help Repository](https://github.com/mirrorz-org/mirrorz-help) 33 | 34 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-docs/current/linux-next.git.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Linux Next Git 3 | sidebar_label: Linux Next 4 | cname: 'linux-next.git' 5 | --- 6 | 7 | 1. Clone the `Linux Next` source code by running: 8 | 9 | ```bash varcode 10 | git clone ${_http}://${_domain}/git/linux-next.git 11 | ``` 12 | 13 | 14 | 1. To add `mirror` to an existing code repository, in an existing repository, run either of the following commands: 15 | 16 | ```bash varcode 17 | git remote add mirror ${_http}://${_domain}/git/linux-next.git 18 | ``` 19 | 20 | or 21 | 22 | ```bash varcode 23 | git remote set-url origin ${_http}://${_domain}/git/linux-next.git 24 | ``` 25 | 26 | This will set the default upstream to the current software mirror site. 27 | 28 | ## References 29 | 30 | [^1] [MirrorZ](https://mirrors.cernet.edu.cn/about) 31 | 32 | [^2] [Help Repository](https://github.com/mirrorz-org/mirrorz-help) 33 | -------------------------------------------------------------------------------- /static/icons/download.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/linux.git.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Linux Mainline Git 镜像使用帮助 3 | sidebar_label: Linux Mainline 4 | cname: 'linux.git' 5 | type: repo 6 | --- 7 | 8 | 1. 克隆 `Linux` 源代码,运行 9 | 10 | ```yaml cli 11 | type: Execute 12 | privileged: false 13 | interpreter: shell 14 | exec: | 15 | #{USE_IN_DOCS/} 16 | git clone ${_http}://${_domain}/git/linux.git 17 | #{/USE_IN_DOCS} 18 | ``` 19 | 20 | 21 | 2. 将 `mirror` 加入已有代码库,在已有仓库中运行 22 | 23 | ```bash varcode 24 | git remote add mirror ${_http}://${_domain}/git/linux.git 25 | ``` 26 | 27 | 或 28 | ```yaml cli 29 | type: Execute 30 | privileged: false 31 | interpreter: shell 32 | exec: | 33 | #{USE_IN_DOCS/} 34 | git remote set-url origin ${_http}://${_domain}/git/linux.git 35 | #{/USE_IN_DOCS} 36 | ``` 37 | 38 | 将默认上游设置为当前软件镜像站。 39 | 40 | ## 引用 41 | 42 | 1. [校园网联合镜像站](https://mirrors.cernet.edu.cn/about) 43 | 2. [帮助仓库](https://github.com/mirrorz-org/mirrorz-help) 44 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-docs/current/linux-stable.git.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Linux Stable Git 3 | sidebar_label: Linux Stable 4 | cname: 'linux-stable.git' 5 | --- 6 | 7 | 1. Clone the `Linux` source code by running: 8 | 9 | ```bash varcode 10 | git clone ${_http}://${_domain}/git/linux-stable.git 11 | ``` 12 | 13 | 14 | 1. To add `mirror` to an existing code repository, in an existing repository, run either of the following commands: 15 | 16 | ```bash varcode 17 | git remote add mirror ${_http}://${_domain}/git/linux-stable.git 18 | ``` 19 | 20 | or 21 | 22 | ```bash varcode 23 | git remote set-url origin ${_http}://${_domain}/git/linux-stable.git 24 | ``` 25 | 26 | This will set the default upstream to the current software mirror site. 27 | 28 | ## References 29 | 30 | [^1] [MirrorZ](https://mirrors.cernet.edu.cn/about) 31 | 32 | [^2] [Help Repository](https://github.com/mirrorz-org/mirrorz-help) 33 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2023/06-08-init.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hello, World! 3 | authors: chengzi 4 | --- 5 | 6 | After development and testing, the brand-new Huazhong University of Science and Technology (HUST) open-source software mirror site is now undergoing testing! 7 | 8 | In terms of technology selection, we have chosen Tunasync from Tsinghua University as the synchronization manager and used Facebook's Docusaurus static site generation framework for website web page construction. 9 | 10 | We have deployed this on a Dell PowerEdge R740 server and have initial plans to synchronize Arch Linux, Debian, and Ubuntu for internal testing within the club. 11 | 12 | The mirror site's source code has already been open-sourced, and currently, we are planning to develop a set of one-click source switching scripts using POSIX Shell. Once they are tested for stability, they will be deployed alongside the current site. 13 | -------------------------------------------------------------------------------- /static/icons/paused.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sidebars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Creating a sidebar enables you to: 3 | - create an ordered group of docs 4 | - render a sidebar for each doc of that group 5 | - provide next/previous navigation 6 | 7 | The sidebars can be generated from the filesystem, or explicitly defined here. 8 | 9 | Create as many sidebars as you want. 10 | */ 11 | 12 | // @ts-check 13 | 14 | /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ 15 | const sidebars = { 16 | // By default, Docusaurus generates a sidebar from the docs folder structure 17 | tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], 18 | 19 | // But you can create a sidebar manually 20 | /* 21 | tutorialSidebar: [ 22 | 'intro', 23 | 'hello', 24 | { 25 | type: 'category', 26 | label: 'Tutorial', 27 | items: ['tutorial-basics/create-a-document'], 28 | }, 29 | ], 30 | */ 31 | }; 32 | 33 | module.exports = sidebars; 34 | -------------------------------------------------------------------------------- /src/pages/cgit/_client.js: -------------------------------------------------------------------------------- 1 | /** add script for change theme button */ 2 | (function () { 3 | var defaultMode = 'light'; 4 | function setTheme(th) { 5 | document.documentElement.setAttribute('data-theme', th); 6 | theme = th; 7 | try { 8 | localStorage.setItem('theme', th); 9 | } catch (err) { } 10 | } 11 | function getStoredTheme() { 12 | var theme = null; 13 | try { 14 | theme = localStorage.getItem('theme'); 15 | } catch (err) { } 16 | return theme; 17 | } 18 | var theme = getStoredTheme() || defaultMode; 19 | var btn = document.querySelector(".navbar__items--right :nth-child(2) button") 20 | btn.disabled = false; 21 | btn.style.cursor = "pointer"; 22 | btn.addEventListener('click', () => { 23 | setTheme(theme == 'dark' ? 'light' : 'dark') 24 | }) 25 | /** remove nav toggle button */ 26 | document.querySelector(".navbar__toggle").remove() 27 | })(); 28 | 29 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-docs/current/about-git.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: About git 3 | --- 4 | 5 | In this software mirror site, repositories ending with `.git` are `Git` repository mirrors. Clicking on the corresponding link on the mirror site's homepage will allow you to copy the clone link. 6 | 7 | Taking the Linux kernel mainline repository as an example, the usage is as shown in the following image: 8 | 9 | Click the appropriate link to copy the clone link, and then use a Git client to clone the code. 10 | 11 | 12 | 13 | 14 | ```bash varcode 15 | git clone ${_http}://${_domain}/git/linux.git 16 | ``` 17 | 18 | ## Important Notes 19 | 20 | Differences between Git repository mirrors and regular software mirrors: 21 | - When this URL is opened in a browser, it displays a non-repository page. 22 | - You can only clone it using a Git client. 23 | - The `git` protocol is not currently supported. -------------------------------------------------------------------------------- /docs/CRAN.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: CRAN 3 | title: CRAN仓库镜像使用帮助 4 | type: lang 5 | automated: true 6 | detection: 7 | policy: OneOf 8 | checks: 9 | - type: file 10 | path: ~/.Rprofile 11 | --- 12 | 13 | ## CRAN 介绍 14 | CRAN 是一个由世界各地的 ftp 和 Web 服务器组成的网络,存储相同的最新版本的 R 代码和文档。 15 | 16 | ## 使用方法 17 | 18 | ### 长期使用 19 | CRAN (The Comprehensive R Archive Network) 镜像源配置文件之一是 `.Rprofile` (linux 下位于 `~/.Rprofile`)。 20 | 21 | ```yaml cli 22 | type: ReplaceIfExist 23 | required: true 24 | description: 替换R配置文件 25 | privileged: false 26 | files: 27 | - path: ~/.Rprofile 28 | statement: '$a options("repos" = c(CRAN="http://${_domain}/CRAN/"))' 29 | ``` 30 | 31 | 32 | 打开 R 即可使用该 CRAN 镜像源安装 R 软件包。 33 | 34 | ### 临时使用 35 | 在安装时指定 repo,如安装 lattice: 36 | 37 | ```raw varcode 38 | install.packages("lattice", repos="${_http}://${_domain}/CRAN/") 39 | ``` 40 | 41 | ## 引用 42 | 1. [Tuna 镜像源使用帮助](https://mirrors.tuna.tsinghua.edu.cn/help/CRAN/) 43 | -------------------------------------------------------------------------------- /docs/linux-stable.git.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Linux Stable Git 镜像使用帮助 3 | sidebar_label: Linux Stable 4 | cname: 'linux-stable.git' 5 | type: repo 6 | --- 7 | 8 | 1. 克隆 `Linux Stable` 源代码,运行 9 | 10 | ```yaml cli 11 | type: Execute 12 | privileged: false 13 | interpreter: shell 14 | exec: | 15 | #{USE_IN_DOCS/} 16 | git clone ${_http}://${_domain}/git/linux-stable.git 17 | #{/USE_IN_DOCS} 18 | ``` 19 | 20 | 2. 将 `mirror` 加入已有代码库,在已有仓库中运行 21 | 22 | ```bash varcode 23 | git remote add mirror ${_http}://${_domain}/git/linux-stable.git 24 | ``` 25 | 26 | 或 27 | 28 | ```yaml cli 29 | type: Execute 30 | privileged: false 31 | interpreter: shell 32 | exec: | 33 | #{USE_IN_DOCS/} 34 | git remote set-url origin ${_http}://${_domain}/git/linux-stable.git 35 | #{/USE_IN_DOCS} 36 | ``` 37 | 38 | 将默认上游设置为当前软件镜像站。 39 | 40 | ## 引用 41 | 42 | 1. [校园网联合镜像站](https://mirrors.cernet.edu.cn/about) 43 | 2. [帮助仓库](https://github.com/mirrorz-org/mirrorz-help) 44 | -------------------------------------------------------------------------------- /blog/authors.yml: -------------------------------------------------------------------------------- 1 | mudongliang: 2 | name: 慕冬亮 3 | title: 华科网安开放原子俱乐部指导教师 4 | url: https://github.com/mudongliang 5 | image_url: https://github.com/mudongliang.png 6 | 7 | chengzi: 8 | name: Chengzi 9 | title: 镜像站维护者成员 10 | url: https://github.com/jxlpzqc 11 | image_url: https://gitee.com/chengziqiu.png 12 | socials: 13 | github: jxlpzqc 14 | 15 | m0rtzz: 16 | name: M0rtzz 17 | title: 镜像站维护者成员 18 | url: https://github.com/M0rtzz 19 | image_url: https://github.com/M0rtzz.png 20 | socials: 21 | github: M0rtzz 22 | 23 | yeying-xingchen: 24 | name: 夜影星辰 25 | title: 普通开发者,镜像站文档贡献者 26 | url: https://github.com/yeying-xingchen 27 | image_url: https://avatars.githubusercontent.com/u/149694986?v=4 28 | socials: 29 | github: yeying-xingchen 30 | 31 | paulkm: 32 | name: Paul Liu 33 | title: 镜像站维护者成员 34 | url: https://github.com/paulkm2006 35 | image_url: https://github.com/paulkm2006.png 36 | socials: 37 | github: paulkm2006 -------------------------------------------------------------------------------- /docs/ohmyzsh.git.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Oh My Zsh 3 | title: Oh My Zsh Git 镜像使用帮助 4 | type: install 5 | --- 6 | 7 | ## Oh My Zsh 简介 8 | Oh My Zsh 是基于 zsh 命令行的一个扩展工具集,提供了丰富的扩展功能,用于管理您的 Zsh 配置。 9 | 它捆绑了数千个有用的功能、助手、插件、主题,并且开箱即用。 10 | 11 | ## 安装 12 | 如果还没有安装 Oh My Zsh,可以通过修改安装脚本中的变量默认值,将其设置为镜像站点的地址安装,使用如下命令: 13 | 14 | ```yaml cli 15 | type: TestAndExecute 16 | privileged: false 17 | interpreter: shell 18 | test: | 19 | has_command omz && return 1 20 | exec: | 21 | #{USE_IN_DOCS/} 22 | REMOTE=${_http}://${_domain}/git/ohmyzsh.git sh -c "$(curl -fsSL ${_http}://${_domain}/ohmyzsh.git/install.sh)" 23 | #{/USE_IN_DOCS} 24 | ``` 25 | 26 | ## 切换已有 ohmyzsh 至镜像源 27 | 如果已经安装了 Oh My Zsh,可以将 git 仓库的 remote 设置为当前镜像站点的地址,使用如下命令: 28 | ```yaml cli 29 | type: TestAndExecute 30 | privileged: false 31 | interpreter: shell 32 | test: | 33 | has_command omz 34 | exec: | 35 | #{USE_IN_DOCS/} 36 | git -C $ZSH remote set-url origin ${_http}://${_domain}/git/ohmyzsh.git 37 | git -C $ZSH pull 38 | #{/USE_IN_DOCS} 39 | ``` -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-docs/current/ohmyzsh.git.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Oh My Zsh 3 | title: Oh My Zsh Git 4 | --- 5 | 6 | ## Introduction to Oh My Zsh 7 | Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. 8 | It comes bundled with thousands of helpful functions, helpers, plugins, themes, and works out of the box. 9 | 10 | ## Installation 11 | If you have not installed Oh My Zsh yet, you can modify the variable $REMOTE in the installation script to set it to the current mirror site address with the following command: 12 | ```bash varcode 13 | REMOTE=${_http}://${_domain}/git/ohmyzsh.git sh -c "$(curl -fsSL ${_http}://${_domain}/ohmyzsh.git/install.sh)" 14 | ``` 15 | 16 | ## Switching an Existing Oh My Zsh to the Mirror Source 17 | If you have already installed Oh My Zsh, you can set the git repository's remote url to the current mirror site address: 18 | ```bash varcode 19 | git -C $ZSH remote set-url origin ${_http}://${_domain}/git/ohmyzsh.git 20 | git -C $ZSH pull 21 | ``` -------------------------------------------------------------------------------- /static/icons/git.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/icons/syncing.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2024/06-26-maintain.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Service Maintenance Notice 3 | authors: chengzi 4 | --- 5 | 6 | Starting from June 26th and lasting until July 10th, we will carry out a large-scale adjustment to the storage space of the mirror site. This mainly involves the expansion of the disk array and data migration. 7 | 8 | During this period, the service may become unstable, and some mirror sources may not be updated in a timely manner. There may even be cases where they are inaccessible. Please, all users, make preparations in advance and switch to other alternative sources. 9 | 10 | We will complete the maintenance work as soon as possible. We apologize for any inconvenience caused. 11 | 12 | 13 | 14 | The mirror sources that may be affected during this period are: 15 | 16 | - pypi 17 | - deepin 18 | - deppin-cd 19 | - openkylin-cdimage 20 | - anolis 21 | - ubuntukylin 22 | - ubuntukylin-cdimage 23 | - virtualbox 24 | - buildroot 25 | - gnu 26 | - CPAN 27 | - alpine 28 | - crates.io-index 29 | - crates 30 | - Rustup 31 | 32 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-docs/current/qemu.git.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: QEMU Git 3 | cname: 'qemu.git' 4 | sidebar_label: QEMU 5 | --- 6 | 7 | 8 | 1. Clone the `QEMU` code and run: 9 | 10 | ```bash varcode 11 | git clone ${_http}://${_domain}/git/qemu.git 12 | ``` 13 | 14 | 1. Add `mirror` to an existing code repository. In an existing repository, run either: 15 | 16 | ```bash varcode 17 | git remote add mirror ${_http}://${_domain}/git/qemu.git 18 | ``` 19 | 20 | or 21 | 22 | ```bash varcode 23 | git remote set-url origin ${_http}://${_domain}/git/qemu.git 24 | ``` 25 | 26 | to set the default upstream to the current software mirror site. 27 | 38 | ## References 39 | 40 | [^1] [ZMirror](https://mirrors.cernet.edu.cn/about) 41 | 42 | [^2] [Help Repository](https://github.com/mirrorz-org/mirrorz-help) 43 | 44 | -------------------------------------------------------------------------------- /src/components/Switch/index.tsx: -------------------------------------------------------------------------------- 1 | import clsx from 'clsx' 2 | import React from 'react' 3 | import styles from './index.module.css' 4 | 5 | type Props = { 6 | label: string; 7 | value: boolean; 8 | onChange: (value: boolean) => void; 9 | labelTop?: boolean; 10 | } 11 | 12 | const Switch: React.FC = ({ label, value, onChange, labelTop }) => { 13 | const handleKeyDown: React.KeyboardEventHandler = (e) => { 14 | if (e.key === 'Enter' || e.key === " ") { 15 | onChange(!value); 16 | e.preventDefault(); 17 | } 18 | }; 19 | 20 | return ( 21 |
22 | {label} 23 |
{ onChange(!value) }} onKeyDown={ handleKeyDown } 25 | title={value ? "启用" : "禁用"}> 26 |
27 |
28 |
29 | ) 30 | } 31 | 32 | 33 | export default Switch; 34 | -------------------------------------------------------------------------------- /docs/qemu.git.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: QEMU Git 镜像使用帮助 3 | cname: 'qemu.git' 4 | sidebar_label: QEMU 5 | type: repo 6 | --- 7 | 8 | 1. 克隆 `QEMU` 代码,运行 9 | 10 | ```yaml cli 11 | type: Execute 12 | privileged: false 13 | interpreter: shell 14 | exec: | 15 | #{USE_IN_DOCS/} 16 | git clone ${_http}://${_domain}/git/qemu.git 17 | #{/USE_IN_DOCS} 18 | ``` 19 | 20 | 21 | 2. 将 `mirror` 加入已有代码库,在已有仓库中运行 22 | 23 | ```bash varcode 24 | git remote add mirror ${_http}://${_domain}/git/qemu.git 25 | ``` 26 | 27 | 或 28 | 29 | ```yaml cli 30 | type: Execute 31 | privileged: false 32 | interpreter: shell 33 | exec: | 34 | #{USE_IN_DOCS/} 35 | git remote set-url origin ${_http}://${_domain}/git/qemu.git 36 | #{/USE_IN_DOCS} 37 | ``` 38 | 39 | 40 | 将默认上游设置为当前软件镜像站。 41 | 42 | 52 | 53 | ## 引用 54 | 55 | 1. [校园网联合镜像站](https://mirrors.cernet.edu.cn/about) 56 | 57 | 2. [帮助仓库](https://github.com/mirrorz-org/mirrorz-help) 58 | 59 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2024/05-07-public-open.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hello, friends on the Internet! 3 | authors: chengzi 4 | --- 5 | 6 | From the initial nginx autoindex to the full-fledged web service we have today; from being used only by a dozen people internally at the very beginning to now being a public service; from synchronizing only four or five mirrors initially to dozens of them currently; from having a storage capacity of just a few hundred gigabytes to tens of terabytes today. 7 | After a whole year of testing and improvement, our mirror site has finally been officially opened to the public! :joy: 8 | Now, our mirror site has truly become a "mirror site" in the real sense, providing more convenient services for a vast number of Internet users. You can access our mirror site from anywhere in the world to download the software packages, mirrors, source code repositories, and so on that you need. 9 | 10 | **Meanwhile, we have discontinued the use of the old domain name mirrors.hust.college and only retained the service of mirrors.hust.edu.cn. Please note to update accordingly.** 11 | 12 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/authors.yml: -------------------------------------------------------------------------------- 1 | mudongliang: 2 | name: Dongliang Mu 3 | title: Mentor of HUST CSE OpenAtom Open Source Club 4 | url: https://github.com/mudongliang 5 | image_url: https://github.com/mudongliang.png 6 | 7 | chengzi: 8 | name: Chengzi 9 | title: HUST Mirror Maintainer 10 | url: https://github.com/jxlpzqc 11 | image_url: https://gitee.com/chengziqiu.png 12 | socials: 13 | github: jxlpzqc 14 | 15 | m0rtzz: 16 | name: M0rtzz 17 | title: HUST Mirror Maintainer 18 | url: https://github.com/M0rtzz 19 | image_url: https://github.com/M0rtzz.png 20 | socials: 21 | github: M0rtzz 22 | 23 | yeying-xingchen: 24 | name: Yeying Xingchen 25 | title: A contributor of HUST mirror site. 26 | url: https://github.com/yeying-xingchen 27 | image_url: https://avatars.githubusercontent.com/u/149694986?v=4 28 | socials: 29 | github: yeying-xingchen 30 | 31 | paulkm: 32 | name: Paul Liu 33 | title: HUST Mirror Maintainer 34 | url: https://github.com/paulkm2006 35 | image_url: https://github.com/paulkm2006.png 36 | socials: 37 | github: paulkm2006 38 | -------------------------------------------------------------------------------- /static/icons/newmirror.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | 13 | 14 | 15 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/components/CliAdvertisement/index.tsx: -------------------------------------------------------------------------------- 1 | import Link from '@docusaurus/Link'; 2 | import Translate, { translate } from '@docusaurus/Translate' 3 | import { useLocation } from '@docusaurus/router' 4 | import { useMirrorMetas } from '@site/src/utils/mirrorUtils'; 5 | import Admonition from '@theme/Admonition' 6 | import React from 'react' 7 | 8 | export default function () { 9 | const { pathname } = useLocation(); 10 | const mirrorHelpid = pathname.split('/')[2]; 11 | const metas = useMirrorMetas(); 12 | let ok = false; 13 | const meta = metas.find(u => u.id == mirrorHelpid || u.helpID == mirrorHelpid); 14 | if (meta && meta.supportCli) { 15 | ok = true; 16 | } 17 | return ok && ( 21 | 22 | 该程序包支持命令行工具一键部署, 23 | 24 | 25 | 26 | 去看看吧! 27 | 28 | 29 | ); 30 | } -------------------------------------------------------------------------------- /docs/manjaro.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Manjaro 3 | title: Manjaro 软件仓库镜像使用帮助 4 | --- 5 | 6 | ## Manjaro 简介 7 | 8 | Manjaro 基于 Arch Linux,但目标是提供一个更加用户友好的系统,让更多用户能够体验 Arch 的强大功能,而不必面对 Arch 的复杂安装和维护过程。 9 | 10 | ## 手动替换 11 | 12 | 编辑 `/etc/pacman.d/mirrorlist` 文件,按以下步骤操作: 13 | 14 | ### 1. 禁用其它软件源(可选) 15 | 16 | 在所有以字符串 `Server` 开头的行前面加上字符 `#`,比如: 17 | 18 | ```mirrorlist 19 | ## Country : Germany 20 | Server = https://mirror.philpot.de/manjaro/unstable/$repo/$arch 21 | ``` 22 | 23 | 改为: 24 | 25 | ```mirrorlist 26 | ## Country : Germany 27 | # Server = https://mirror.philpot.de/manjaro/unstable/$repo/$arch 28 | ``` 29 | 30 | ### 2. 启用本站镜像源 31 | 32 | 在本行末尾添加如下内容: 33 | 34 | ```mirrorlist varcode 35 | ## Country : China 36 | # Server = ${_http}://${_domain}/manjaro/unstable/$repo/$arch 37 | ``` 38 | 39 | ### 3. 保存文件并更新源列表 40 | 41 | 在您的编辑器内保存更改,并退出编辑器,随后执行以下命令: 42 | 43 | ```bash varcode 44 | [ ] (root) 是否为 root 用户 45 | --- 46 | const SUDO = !root ? 'sudo ' : ''; 47 | --- 48 | ${SUDO}pacman -Syu 49 | ``` 50 | 51 | ## 引用 52 | 53 | 1. [使用帮助 - Manjaro Wiki](https://wiki.manjaro.org/index.php/Change_to_a_Different_Download_Server) 54 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 慕冬亮 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2025/09-12-change.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Mirror Repository Update Notification 3 | authors: m0rtzz 4 | --- 5 | 6 | To better meet user needs and optimize resource allocation, we have updated the synchronization policy for our mirror repository as follows: 7 | 8 | 1. **Resumed Synchronizations:** 9 | - Synchronization of all cgit repositories, including critical code repositories such as `linux.git`, has been fully restored. 10 | - OpenBSD mirror synchronization has been re-enabled, and resources for this project are once again available via our service. 11 | 12 | 2. **Refined Synchronization Scope:** 13 | - The synchronization strategy for the Anolis OS mirror has been optimized: going forward, only the **two most recent minor versions** within each major release will be synchronized. 14 | - In accordance with this policy, synchronization for Anolis OS versions **8.2, 8.4, 8.6, and 8.8** has been discontinued. 15 | 16 | We remain committed to enhancing the stability and efficiency of our mirror service, striving to deliver a higher-quality user experience. Thank you for your continued support and understanding. 17 | -------------------------------------------------------------------------------- /src/utils/mirrorUtils.ts: -------------------------------------------------------------------------------- 1 | import { usePluginData } from '@docusaurus/useGlobalData'; 2 | import type { DomainMeta, MirrorMeta, ReleaseMeta } from '@site/meta.config'; 3 | import meta from '@site/meta.config'; 4 | 5 | export type DocMeta = { 6 | id: string; 7 | path: string; 8 | sidebar: string; 9 | } 10 | 11 | export type NewsMeta = { 12 | title: string; 13 | date: string; 14 | link: string; 15 | id: string; 16 | } 17 | 18 | /** 19 | * Get mirror metas. 20 | * @returns mirror metas. 21 | */ 22 | export function useMirrorMetas(): MirrorMeta[] { 23 | return meta.mirrors; 24 | } 25 | 26 | /** 27 | * Get domain metas. 28 | * @returns domain metas. 29 | */ 30 | export function useDomainMetas(): DomainMeta[] { 31 | return meta.domains; 32 | } 33 | 34 | /** 35 | * Hook function, to get all docs. 36 | */ 37 | export function useDocMetas() { 38 | const docPluginData = usePluginData("docusaurus-plugin-content-docs") as any; 39 | const alldocs: DocMeta[] = docPluginData.versions[0].docs; 40 | return alldocs; 41 | } 42 | 43 | /** 44 | * Hook function, to get all news. 45 | */ 46 | export function useNewsList(): NewsMeta[] { 47 | return usePluginData("news-meta") as NewsMeta[]; 48 | } 49 | -------------------------------------------------------------------------------- /docs/gentoo.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Gentoo 3 | title: Gentoo 软件仓库镜像使用帮助 4 | cname: 'gentoo' 5 | --- 6 | 7 | ## Gentoo 简介 8 | 9 | Gentoo Linux 是一个适用于多种计算机系统架构的 Linux 发行版。本仓库提供的是 Gentoo 的 Stage3 的镜像。 10 | :::info 11 | stage 文件是一个压缩包,可以作为完整 Gentoo 环境的种子。 12 | stage 3 文件可以在任意一个 Gentoo 官方镜像站及本站的 `releases/amd64/autobuilds/` 内下载。Stage 文件更新比较频繁因此不会包含在官方 live 镜像中。 13 | ::: 14 | 15 | ## 安装时配置 16 | 打开 [Gentoo 主网站下载小节](https://www.gentoo.org/downloads/#other-arches),右键单击 stage 文件的链接,然后复制链接到剪贴板,将其中的 17 | `https://distfiles.gentoo.org/` 替换成 18 | ```bash varcode 19 | ${_http}://${_domain}/gentoo/ 20 | ``` 21 | 代替原链接,在接下来的安装步骤中使用。 22 | 23 | ## Gentoo Prefix Bootstrap 配置镜像 24 | 在您运行 Bootstrap 脚本之前,可以通过执行以下命令设置环境变量来设置在 Bootstrap 过程中使用本镜像仓库。 25 | ```bash varcode 26 | export GENTOO_MIRRORS="${_http}://${_domain}/gentoo" 27 | export SNAPSHOT_URL="${_http}://${_domain}/gentoo/snapshots" 28 | export GNU_URL="${_http}://mirror/gnu" 29 | ``` 30 | 31 | ## Distfiles 配置 32 | 您可以在 `/etc/portage/make.conf` 中写入: 33 | ```conf varcode 34 | GENTOO_MIRRORS="${_http}://${_domain}/gentoo" 35 | ``` 36 | 设置完成后,您可以在终端执行 `emerge --sync` 进行更新。 37 | 38 | ## 引用 39 | 1. [Gentoo 手册 AMD64:安装](https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation/zh-cn) 40 | -------------------------------------------------------------------------------- /docs/llvm-project.git.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: LLVM Project Git 镜像使用帮助 3 | sidebar_label: llvm-project.git 4 | type: repo 5 | --- 6 | 7 | 8 | ## LLVM Project 介绍 9 | 10 | LLVM 是一个开源的项目,是一个编译器框架,是一系列模块化、可重用的编译器以及工具链技术的集合。 11 | 12 | 其包含了一系列子项目:clang、lldb、libc++、libc++abi、klee、lld 等。 13 | 14 | 15 | ## 镜像仓库介绍 16 | 17 | 该镜像站点镜像了 LLVM Project 的 [GitHub 仓库](https://github.com/llvm/llvm-project.git)。 18 | 19 | :::info 发布版本 20 | 如果需要各个子项目的发布版本源代码,该镜像站暂时不提供镜像,请至 [GitHub Release](https://github.com/llvm/llvm-project/releases) 下载。 21 | ::: 22 | 23 | ## LLVM Project Git 镜像使用帮助 24 | 25 | 如需克隆代码,使用 26 | ```yaml cli 27 | type: Execute 28 | privileged: false 29 | interpreter: shell 30 | exec: | 31 | #{USE_IN_DOCS/} 32 | git clone ${_http}://${_domain}/llvm-project.git 33 | #{/USE_IN_DOCS} 34 | ``` 35 | 36 | 由于仓库体积均较大,执行 `git clone` 可能需要较长时间。 37 | 38 | 若要将 mirror 加入已有代码库,可在已有仓库中运行 39 | 40 | ```shell varcode 41 | git remote add mirror ${_http}://${_domain}/llvm-project.git 42 | ``` 43 | 44 | 或运行 45 | 46 | ```yaml cli 47 | type: Execute 48 | privileged: false 49 | interpreter: shell 50 | exec: | 51 | #{USE_IN_DOCS/} 52 | git remote set-url origin ${_http}://${_domain}/llvm-project.git 53 | #{/USE_IN_DOCS} 54 | ``` 55 | 56 | 将默认上游设置为镜像站 57 | -------------------------------------------------------------------------------- /src/pages/fancyindex/index.module.css: -------------------------------------------------------------------------------- 1 | .header { 2 | padding: 28px 2rem; 3 | flex-direction: column; 4 | align-items: stretch; 5 | } 6 | 7 | @media (max-width: 996px) { 8 | .header { 9 | padding: 32px 16px; 10 | } 11 | } 12 | 13 | .title-container { 14 | max-width: 1446px; 15 | margin: auto; 16 | width: 100%; 17 | } 18 | 19 | .title { 20 | display: flex; 21 | flex-direction: row; 22 | justify-content: space-between; 23 | } 24 | 25 | .blist { 26 | display: flex; 27 | flex-direction: row; 28 | } 29 | 30 | .blist a { 31 | margin-right: 16px; 32 | } 33 | 34 | .breadcrumbs { 35 | margin: 16px 0; 36 | } 37 | 38 | .content { 39 | max-width: 1530px; 40 | width: 100%; 41 | margin: 0px auto; 42 | 43 | } 44 | 45 | .cliBlock { 46 | border: solid 1.5px var(--ifm-color-content-inverse); 47 | padding: 4px 20px; 48 | vertical-align: middle; 49 | border-radius: 4px; 50 | } 51 | 52 | @media screen and (min-width:996px) { 53 | .table { 54 | margin: 32px; 55 | } 56 | .breadcrumbs { 57 | margin: 16px 32px; 58 | } 59 | } 60 | 61 | @media screen and (max-width:720px) { 62 | .table tr>*:last-child { 63 | display: none; 64 | } 65 | } -------------------------------------------------------------------------------- /static/icons/image.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/icons/link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/theme/Footer/index.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: flex; 3 | flex-direction: row; 4 | justify-content: space-between; 5 | padding: 0; 6 | max-width: 1466px !important; 7 | /* calc(1530px - 64px); */ 8 | font-size: 14px; 9 | } 10 | 11 | .container div:first-child div { 12 | margin-bottom: 0.3em; 13 | } 14 | 15 | .logos { 16 | display: flex; 17 | flex-direction: row; 18 | flex-wrap: wrap; 19 | min-width: 150px; 20 | align-items: center; 21 | } 22 | 23 | .logos img { 24 | margin-left: 16px; 25 | margin-bottom: 16px; 26 | } 27 | 28 | @media screen and (max-width: 996px) { 29 | .container { 30 | padding: 16px; 31 | } 32 | 33 | } 34 | 35 | @media screen and (max-width: 480px) { 36 | .container { 37 | flex-direction: column; 38 | } 39 | 40 | .logos { 41 | flex-direction: column; 42 | } 43 | 44 | .logos img { 45 | margin-top: 16px; 46 | margin-left: 0; 47 | margin-bottom: 0; 48 | } 49 | } 50 | 51 | .logos .light { 52 | display: block; 53 | } 54 | 55 | .logos .dark { 56 | display: none; 57 | } 58 | 59 | [data-theme="dark"] .logos .light { 60 | display: none; 61 | } 62 | 63 | [data-theme="dark"] .logos .dark { 64 | display: block; 65 | } 66 | 67 | -------------------------------------------------------------------------------- /blog/2024/02-08-mirrorz.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 集成 MirrorZ 文档 3 | authors: chengzi 4 | --- 5 | 6 | 目前,我们镜像站目前缺失一些文档,除此以外,后期随着我们同步的镜像源增多、 7 | 镜像源不断更新,我们需要花费大量的时间来维护文档。 8 | 我们希望将我们站点一些不热门的镜像源集成 MirrorZ 的文档,以便更好地为用户提供服务。 9 | 10 | 集成以后,我们希望使用 MirrorZ 更多、更新更频繁的文档来帮助用户更好地使用我们的镜像站。 11 | 12 | 13 | 14 | ## 集成方法 15 | 16 | 根据 MirrorZ 的 [Readme](https://github.com/mirrorz-org/mirrorz-help),我们可以使用下面几种方式集成 MirrorZ 的文档: 17 | 18 | - link in the mirror frontend e.g., ISCAS, SJTUG and SDU 19 | - link in the mirror help e.g., NWAFU 20 | - Fork/Rebase and Transpile mdx to local markdown e.g., TUNA/BFSU 21 | - Self-host e.g., xtom.help 22 | - Reverse proxy e.g., NJU 23 | 24 | 我们考虑到了以下几点: 25 | 1. 我们希望用户在浏览我们的镜像站时,可以直接访问到 MirrorZ 的文档,而不需要跳转到其他站点。 26 | 2. 我们希望用户在阅读 MirrorZ 的文档时,可以获得和我们维护的文档相似的体验。 27 | 3. 我们希望对 MirrorZ 的文档进行一些定制化的修改,比如修改超链接的地址,以适应我们的站点。 28 | 29 | 综合以上需求,我们决定使用第三种方式集成 MirrorZ 的文档。 30 | 31 | ## 方案 32 | 33 | 我们编写的脚本将使用以下步骤来集成 MirrorZ 的文档: 34 | 35 | 1. 下载 MirrorZ 的文档 36 | 2. 将 MirrorZ 的文档转换为我们站点的格式 37 | 3. 替换超链接的地址 38 | 4. 替换 markdown 前言部分的元数据 39 | 5. 增加来源提示,以及原文链接 40 | 41 | 除此以外,我们还需要编写更新脚本辅助后期和上游文档的同步。 42 | 43 | ## 实现 44 | 45 | 我们实现了两个脚本,一个用于下载并生成 MirrorZ 的文档,一个用于更新 MirrorZ 的文档。 46 | 具体实现可以参考站点目录的 `scripts` 目录。使用方法可以参考 Readme。 47 | 48 | 后期我们会考虑使用类似于 Github Actions 的工具来自动化更新过程,让文档定期更新,保持和上游的同步。 49 | -------------------------------------------------------------------------------- /docs/llvm-apt.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: LLVM APT 镜像使用帮助 3 | sidebar_label: LLVM APT 4 | --- 5 | 6 | ## LLVM APT 介绍 7 | 8 | LLVM APT 是一个为 Debian 和 Ubuntu 系统提供的 APT 仓库,用于安装 LLVM 工具链。 9 | 10 | ## 自动安装 11 | 12 | LLVM 官方提供了一个自动配置与安装的[脚本](https://mirrors.hust.edu.cn/llvm-apt/llvm.sh),支持 Debian、Ubuntu 系列的安装。 13 | 14 | ```shell varcode 15 | [ ] (version) { all:Default, 19:19, 18:18, 17:17, 16:16, 15:15, 14:14, 13:13, 12:12, 11:11, 10:10, 9:9 } LLVM 版本 16 | [ ] (root) 是否为 root 用户 17 | --- 18 | const SUDO = !root ? 'sudo ' : ''; 19 | --- 20 | wget ${_http}://${_domain}/llvm-apt/llvm.sh -O llvm.sh 21 | chmod +x llvm.sh 22 | ./llvm.sh ${version} -m ${_http}://${_domain}/llvm-apt 23 | ``` 24 | 25 | ## 手动安装 26 | 27 | ```shell varcode 28 | [ ] (version) { noble:Ubuntu 24.04, jammy:Ubuntu 22.04, focal:Ubuntu 20.04, bookworm:Debian 12, bullseye:Debian 11 } Distribution 29 | [ ] (src) 启用源码镜像 30 | [ ] (root) 是否为 root 用户 31 | --- 32 | const SRC_PREFIX = src ? "" : "# "; 33 | const SUDO = !root ? 'sudo ' : ''; 34 | --- 35 | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | ${SUDO}apt-key add - 36 | 37 | ${SUDO}tee /etc/apt/sources.list.d/llvm.list > /dev/null << EOF 38 | deb ${_http}://${_domain}/llvm-apt/${version} llvm-toolchain-${version} main 39 | ${SRC_PREFIX}deb-src ${_http}://${_domain}/llvm-apt/${version} llvm-toolchain-${version} main 40 | EOF 41 | ``` -------------------------------------------------------------------------------- /src/components/CliAnimation/index.module.css: -------------------------------------------------------------------------------- 1 | /* breeze */ 2 | .code-blue { 3 | color: #1d99f3; 4 | } 5 | 6 | .code-green { 7 | color: #11d116; 8 | } 9 | 10 | .code-red { 11 | color: #ed1515; 12 | } 13 | 14 | .code-yellow { 15 | color: #f67400; 16 | } 17 | 18 | .code-bold { 19 | font-weight: bold; 20 | } 21 | 22 | .code-underline { 23 | text-decoration: underline; 24 | } 25 | 26 | .window { 27 | border-radius: 10px; 28 | background: rgb(21, 23, 24); 29 | text-align: left; 30 | padding: 16px; 31 | } 32 | 33 | .container { 34 | font-family: Hack, consolas, Menlo, monaco, roboto, monospace; 35 | position: relative; 36 | font-size: 14px; 37 | line-height: 20px; 38 | color: #d2d2d2; 39 | overflow: auto; 40 | height: calc(100% - 40px); 41 | scrollbar-width: none; 42 | } 43 | 44 | .block { 45 | unicode-bidi: embed; 46 | /* white-space: pre-wrap; */ 47 | white-space: pre; 48 | } 49 | 50 | .line { 51 | min-height: 20px; 52 | } 53 | 54 | .container::-webkit-scrollbar { 55 | display: none; 56 | } 57 | 58 | .cursor { 59 | position: absolute; 60 | width: 8px; 61 | height: 18px; 62 | background: #d2d2d2; 63 | animation: blink 1s infinite; 64 | } 65 | 66 | @keyframes blink { 67 | 0% { 68 | opacity: 1; 69 | } 70 | 50% { 71 | opacity: 0; 72 | } 73 | 100% { 74 | opacity: 1; 75 | } 76 | } 77 | 78 | -------------------------------------------------------------------------------- /docs/ros.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ROS 镜像使用帮助 3 | sidebar_label: ROS 4 | --- 5 | 6 | ## ROS 介绍 7 | 8 | ROS (机器人操作系统,Robot Operating System),是专为机器人软件开发所设计出来的一套电脑操作系统架构。其托管在 [http://packages.ros.org/ros](http://packages.ros.org/ros) 上。 9 | 10 | ## ROS 软件源替换 11 | 12 | 1. 安装依赖: 13 | 14 | ```shell varcode 15 | [ ] (root) 是否为 root 用户 16 | --- 17 | const SUDO = !root ? 'sudo ' : ''; 18 | --- 19 | ${SUDO}apt install -y gnupg 20 | ``` 21 | 22 | 2. 导入 key: 23 | 24 | ```shell varcode 25 | [ ] (root) 是否为 root 用户 26 | --- 27 | const SUDO = !root ? 'sudo ' : ''; 28 | --- 29 | ${SUDO}gpg --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 30 | ${SUDO}gpg --export C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 | ${SUDO}tee /usr/share/keyrings/ros.gpg > /dev/null 31 | ``` 32 | 33 | 3. 将软件源添加至系统: 34 | 35 | ```shell varcode 36 | [ ] (root) 是否为 root 用户 37 | --- 38 | const SUDO = !root ? 'sudo ' : ''; 39 | --- 40 | ${SUDO}tee /etc/apt/sources.list.d/ros-latest.list > /dev/null << EOF 41 | deb [signed-by=/usr/share/keyrings/ros.gpg] ${_http}://${_domain}/ros/ubuntu $(lsb_release -sc) main 42 | EOF 43 | ``` 44 | 45 | 4. 刷新软件源缓存: 46 | 47 | ```shell varcode 48 | [ ] (root) 是否为 root 用户 49 | --- 50 | const SUDO = !root ? 'sudo ' : ''; 51 | --- 52 | ${SUDO}apt update -y 53 | ``` 54 | 55 | 5. 安装所需的 ROS 发行版。 56 | 57 | ## 引用 58 | 59 | 1. [中科大镜像源使用帮助](https://mirrors.ustc.edu.cn/help/ros.html) 60 | -------------------------------------------------------------------------------- /static/icons/news.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HUST Mirror 网页 & 文档 2 | 3 | [![](https://img.shields.io/badge/Join_QQ-%E5%8D%8E%E7%A7%91%E5%A4%A7%E5%BC%80%E6%BA%90%E9%95%9C%E5%83%8F%E7%AB%99%E6%8A%80%E6%9C%AF%E4%BA%A4%E6%B5%81%E7%BE%A4-white?style=for-the-badge&color=76bad9&logo=qq&logoColor=76bad9)]( https://qm.qq.com/q/GxLlEDSdMI ) 4 | 5 | 该网站使用 [Docusaurus](https://docusaurus.io/) 构建。 6 | 7 | ## 开发 8 | 9 | ### 安装依赖 10 | 11 | ``` 12 | $ yarn 13 | ``` 14 | 15 | ### 本地开发 16 | 17 | ``` 18 | $ yarn start 19 | ``` 20 | 21 | 该命令会启动一个本地开发服务器,并打开一个浏览器窗口。大多数更改都会在不必重新启动服务器的情况下实时重载。 22 | 23 | ### 构建 24 | 25 | ``` 26 | $ yarn build 27 | ``` 28 | 29 | 该命令会将静态内容生成到 `build` 目录中,可以使用任何静态内容托管服务进行服务。 30 | 31 | ### 自动生成 CLI 32 | 33 | ``` 34 | $ python scripts/parser.py 35 | ``` 36 | 37 | 该命令会自动读取文档中可以生成 `hustmirrors-cli` 替换脚本的部分,并将其生成为相应镜像的脚本,保存在 `generated_scripts` 目录下。 38 | 39 | 有关编写自动生成镜像替换脚本的文档,请参考 [USAGE.md](USAGE.md) 40 | 41 | 42 | ## 贡献 43 | 44 | 欢迎任何形式的贡献,包括但不限于提交问题报告、功能请求、文档改进、翻译等。 45 | 46 | ### 站点功能 47 | 48 | 如果您发现了站点的任何问题,或者有任何功能请求,请在 49 | [GitHub Issues](https://github.com/hust-open-atom-club/hust-mirrors/issues) 中提交一个问题报告, 50 | 或者直接提交一个 Pull Request。 51 | 52 | 53 | ### 文档改进 54 | 55 | 如果您发现了文档中的任何问题,或者有任何改进意见,请在 56 | [GitHub Issues](https://github.com/hust-open-atom-club/hust-mirrors/issues) 中提交一个问题报告, 57 | 或者直接提交一个 Pull Request。 58 | 59 | #### 文档格式 60 | 61 | 文档采用 Markdown 格式编写,如果需要支持用户交互的代码块,请参考 Ubuntu 文档的写法。 62 | 63 | ## 许可证 64 | 65 | MIT 66 | -------------------------------------------------------------------------------- /docs/F-Droid.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: F-Droid 3 | title: F-Droid 软件仓库镜像使用帮助 4 | cname: 'F-Droid' 5 | --- 6 | 7 | ## F-Droid 简介 8 | 9 | F-Droid 是一个 Android 平台上 FOSS(Free and Open Source Software,自由开源软件)的目录,并提供下载安装支持。使用客户端可以更轻松地浏览、安装及跟进设备上的应用更新。这是一个 f-droid.org 上安卓自由软件的镜像。 10 | 11 | ## 配置镜像 12 | 13 | 用 F-Droid 客户端打开此链接:[https://mirrors.hust.edu.cn/fdroid/repo/?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB](https://mirrors.hust.edu.cn/fdroid/repo/?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB) 或点击[这里](https://mirrors.hust.edu.cn/fdroid/repo/?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB),选择用 F-Droid 客户端打开,一键使用。 14 | 15 | ### 配置 Archive 镜像 16 | 17 | 用 F-Droid 客户端打开此链接:[https://mirrors.hust.edu.cn/fdroid/repo/?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB](https://mirrors.hust.edu.cn/fdroid/archive/?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB) 或点击[这里](https://mirrors.hust.edu.cn/fdroid/archive/?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB),选择用 F-Droid 客户端打开,一键使用。 18 | 19 | ## 下载 F-Droid 客户端 20 | 21 | 我们推荐您从[官网](https://f-droid.org/)下载。 22 | 如果您无法进入 f-droid.org,也可以点击[这里](https://mirrors.hust.edu.cn/fdroid/repo/org.fdroid.fdroid_1023051.apk)在本站下载 F-Droid 客户端。 23 | 24 | ## 引用 25 | 26 | 1. [使用帮助 - F-Driod](https://mirrors.hust.edu.cn/fdroid/repo/) 27 | -------------------------------------------------------------------------------- /docs/ros2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ROS2 镜像使用帮助 3 | sidebar_label: ROS2 4 | --- 5 | 6 | ## ROS2 介绍 7 | 8 | ROS2 (Robot Operating System 2) 是 ROS (机器人操作系统,Robot Operating System) 的下一代版本,它是一个用于机器人开发的开源平台,提供了一系列工具和库,用于构建机器人应用程序。其托管在 [http://packages.ros.org/ros2](http://packages.ros.org/ros2) 上。 9 | 10 | ## ROS2 软件源替换 11 | 12 | 1. 安装依赖 13 | 14 | ```shell varcode 15 | [ ] (root) 是否为 root 用户 16 | --- 17 | const SUDO = !root ? 'sudo ' : ''; 18 | --- 19 | ${SUDO}apt install -y curl gnupg2 ca-certificates 20 | ``` 21 | 22 | 2. 导入 key: 23 | 24 | ```shell varcode 25 | [ ] (root) 是否为 root 用户 26 | --- 27 | const SUDO = !root ? 'sudo ' : ''; 28 | --- 29 | ${SUDO}curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg 30 | ``` 31 | 32 | 3. 将软件源添加至系统: 33 | 34 | ```shell varcode 35 | [ ] (root) 是否为 root 用户 36 | --- 37 | const SUDO = !root ? 'sudo ' : ''; 38 | --- 39 | ${SUDO}tee /etc/apt/sources.list.d/ros2.list > /dev/null << EOF 40 | deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] ${_http}://${_domain}/ros2/ubuntu $(lsb_release -sc) main 41 | EOF 42 | ``` 43 | 44 | 4. 刷新软件源缓存: 45 | 46 | ```shell varcode 47 | [ ] (root) 是否为 root 用户 48 | --- 49 | const SUDO = !root ? 'sudo ' : ''; 50 | --- 51 | ${SUDO}apt update -y 52 | ``` 53 | 54 | 5. 安装所需的 ROS 发行版。 55 | 56 | ## 引用 57 | 58 | 1. [中科大镜像源使用帮助](https://mirrors.ustc.edu.cn/help/ros2.html) 59 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2023/09-13-alpha.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Neo Version of Hust Mirror is rolling out for alpha testing! 3 | authors: mudongliang 4 | --- 5 | 6 | On September 13th, after more than three months of internal testing, the Huazhong University of Science and Technology (HUST) Open Source Mirror Site has officially launched for internal testing, available at the temporary URL [https://mirrors.hust.college](https://mirrors.hust.college). Currently, the open source mirror station has synchronized 27 mirror sources with a data volume of 13TB, and provides three access methods: HTTP, HTTPS and RSYNC. 7 | 8 | # Open Source Code 9 | We have now made the front-end and back-end code used by the mirror site publicly available under the Gitee organization (https://gitee.com/dzm91_hust/). We welcome everyone to star🌟! 10 | 11 | - Front-end code: [https://gitee.com/dzm91_hust/hust-mirrors](https://gitee.com/dzm91_hust/hust-mirrors) 12 | - Back-end code: [https://gitee.com/dzm91_hust/tunasync](https://gitee.com/dzm91_hust/tunasync) 13 | - CLI tool: [https://gitee.com/dzm91_hust/hustmirror-cli](https://gitee.com/dzm91_hust/hustmirror-cli) 14 | 15 | # Want to Provide Feedback? 16 | Mirror requests, fault reports, and any other suggestions for improving this open source mirror site can be submitted in the issues section of our provided repositories. Alternatively, you can email us at mirror_support@hust.edu.cn. We look forward to hearing from you! 17 | -------------------------------------------------------------------------------- /docs/buildroot.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Buildroot 3 | title: Buildroot 仓库镜像使用帮助 4 | --- 5 | 6 | ## Buildroot 简介 7 | 8 | Buildroot 是一个创建嵌入式 Linux 系统的框架。其采用 KBuild 框架编写,由 Makefile 和 KConfig 文件构成,可以很方便的像编译内核一样,使用 menuconfig 修改配置,为各种架构的嵌入式设备创建 Linux 根文件系统、交叉编译工具链。 9 | 10 | ## Buildroot 下载 11 | 12 | 如果官方站点连接速度缓慢,直接前往该镜像站的[下载页面](/release?release=Buildroot)。 13 | 选择 buildroot,并选择所需要的版本进行下载。 14 | 15 | 然后在本地使用 tar 工具进行解包。 16 | 17 | ## Buildroot 换源 18 | 19 | Buildroot 在构建过程中需要使用 kernel、gnu、CPAN 等源。 20 | 21 | 除此以外的其他源码包会在上游仓库或者其备用服务器 [http://sources.buildroot.net/](http://sources.buildroot.net/)下载。 22 | 23 | 本镜像站已经镜像 gnu 和 CPAN 以及 kernel,可以在 buildroot 的配置文件中修改这些源地址。 24 | 25 | ### 方法一:手动修改 26 | 27 | 首先备份你的 config 文件,并手动修改配置信息。(可以使用 menuconfig,nconfig,甚至可以直接编辑文件进行修改) 28 | 29 | ```raw varcode 30 | BR2_KERNEL_MIRROR="${_http}://${_domain}/kernel.org" 31 | BR2_GNU_MIRROR="${_http}://${_domain}/gnu" 32 | BR2_CPAN_MIRROR="${_http}://${_domain}/CPAN" 33 | ``` 34 | 35 | ### 方法二:使用脚本替换 36 | 37 | :::info 38 | 使用脚本替换前,请确保已经存在 `.config` 文件。可以使用 `make defconfig` 生成默认配置文件。 39 | ::: 40 | 41 | 在 buildroot 根目录(有 `.config` 文件的目录)运行下面的替换脚本: 42 | 43 | ```bash varcode 44 | sed -i.old \\ 45 | -e '/BR2_KERNEL_MIRROR/c\\BR2_KERNEL_MIRROR="${_http}://${_domain}/kernel.org"' \\ 46 | -e '/BR2_GNU_MIRROR/c\\BR2_GNU_MIRROR="${_http}://${_domain}/gnu"' \\ 47 | -e '/BR2_CPAN_MIRROR/c\\BR2_CPAN_MIRROR="${_http}://${_domain}/CPAN"' \\ 48 | .config 49 | 50 | ``` 51 | 52 | 然后执行 `make` 开始构建。 53 | -------------------------------------------------------------------------------- /src/pages/syncing-status/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react'; 2 | import Layout from '@theme/Layout'; 3 | import { translate } from '@docusaurus/Translate' 4 | import Table from '@site/src/components/Table'; 5 | 6 | 7 | export default function Home(): JSX.Element { 8 | const [loading, setLoading] = useState(false); 9 | const [items, setItems] = useState([]); 10 | const [err, setErr] = useState(false); 11 | const [search, setSearch] = useState(""); 12 | 13 | const getItems = async () => { 14 | setLoading(true); 15 | try { 16 | const resp = await fetch("/status.json"); 17 | const data = await resp.json(); 18 | setItems(data); 19 | } 20 | catch { 21 | setErr(true); 22 | } 23 | setLoading(false); 24 | } 25 | 26 | useEffect(() => { 27 | getItems(); 28 | }, []); 29 | 30 | return ( 31 | 40 |
41 | {loading ? 42 |
45 | 正在加载... 46 |
: 47 |
50 |
51 |
52 | } 53 |
54 |
55 | ); 56 | } 57 | -------------------------------------------------------------------------------- /src/components/DocGlobalOptions/index.tsx: -------------------------------------------------------------------------------- 1 | import Translate, { translate } from '@docusaurus/Translate'; 2 | import { useDomainMetas } from '@site/src/utils/mirrorUtils'; 3 | import SharedContext from '@site/src/utils/SharedContext' 4 | import React, { useContext } from 'react' 5 | import Select from '@site/src/components/Select/index' 6 | import Switch from '@site/src/components/Switch/index'; 7 | import styles from './index.module.css' 8 | 9 | interface Props extends React.HTMLProps { } 10 | 11 | export default function GlobalOptions(props: Props) { 12 | const context = useContext(SharedContext); 13 | const domains = useDomainMetas(); 14 | return ( 15 |
16 | 73 | }) 74 | } 75 |
} 76 | 77 | 78 | {code(vars)} 79 | 80 | 81 | ) 82 | 83 | } 84 | -------------------------------------------------------------------------------- /docs/rustup.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Rustup 3 | title: Rustup工具链安装器使用帮助 4 | --- 5 | 6 | :::warning 注意事项 7 | 镜像站只保留最新的 stable,beta 和 nightly,如果需要使用 rustup 安装旧版工具链,请使用官方源。 8 | ::: 9 | 10 | ## Windows 用户 11 | 12 | ### 初次安装 Rust 工具链 13 | 14 | 要使用 Rust(MSVC)之前,可能需要安装 MSVC 编译工具链(Microsoft C++ 生成工具)。 15 | 16 | 使用 powershell 运行下面的脚本。(下载 exe 过程中,Windows 反恶意软件服务会进行文件扫描,可能需要等待大约半分钟。) 17 | 18 | ```powershell varcode 19 | [] (abi) { msvc: MSVC, gnu: GNU } 选择后端 20 | [] (arch) { x86_64: x64, i386: x86 } 选择架构 21 | --- 22 | let name = arch == 'i386' ? 'i686-pc-windows-': 'x86_64-pc-windows-'; 23 | name += abi; 24 | --- 25 | Invoke-WebRequest -OutFile \${env:TEMP}/rustup-init.exe ${_http}://${_domain}/rustup/rustup/dist/${name}/rustup-init.exe 26 | \$env:RUSTUP_DIST_SERVER = "${_http}://${_domain}/rustup" 27 | \$env:RUSTUP_UPDATE_ROOT = "${_http}://${_domain}/rustup/rustup" 28 | & "\${env:TEMP}\\rustup-init.exe" 29 | 30 | ``` 31 | 32 | :::info 关于Windows上的Rust编译器后端 33 | 如果你不知道如何选择,请使用 MSVC 版本。 34 | ::: 35 | 36 | :::caution 37 | 上面的安装脚本仅在安装时启用镜像源,下次更新又会恢复官方源,如果你需要长期启用镜像源, 38 | 请参考下一小节的内容。 39 | ::: 40 | 41 | ### 长期启用 rustup 工具链的镜像源 42 | 43 | export function VarValue(props) { 44 | const appendix = props.appendix || ""; 45 | return 46 | {`${http}://${domain}/rustup${appendix}`}} /> 47 | } 48 | 49 | **方法一:**在 “系统-高级系统设置-环境变量” 中增加环境变量。 50 | 51 | - 变量名为 `RUSTUP_DIST_SERVER`,值为。 52 | - 变量名为 `RUSTUP_UPDATE_ROOT`,值为。 53 | 54 | **方法二(推荐):**直接执行下面的 Powershell 脚本: 55 | 56 | ```powershell varcode 57 | [System.Environment]::SetEnvironmentVariable("RUSTUP_DIST_SERVER", "${_http}://${_domain}/rustup", "User") 58 | [System.Environment]::SetEnvironmentVariable("RUSTUP_UPDATE_ROOT", "${_http}://${_domain}/rustup/rustup", "User") 59 | ``` 60 | 61 | 62 | ## *nix 用户 63 | 64 | ### 初次安装 Rust 工具链 65 | 66 | 考虑到官方网站提供的 [https://sh.rustup.rs](https://sh.rustup.rs) 脚本网络环境可能不稳定,我们已经镜像了该脚本。 67 | 68 | 直接执行下面的命令即可完成 rust 工具链的安装。 69 | 70 | ```bash varcode 71 | [x] (shMirror) 使用安装脚本镜像 72 | --- 73 | const shellUrl = shMirror ? `${_http}://${_domain}/rustup/rustup.sh` : "https://sh.rustup.rs"; 74 | --- 75 | RUSTUP_DIST_SERVER="${_http}://${_domain}/rustup" \\ 76 | RUSTUP_UPDATE_ROOT="${_http}://${_domain}/rustup/rustup" \\ 77 | curl -sSf ${shellUrl} | sh 78 | ``` 79 | 80 | ### 长期使用 81 | 82 | 将下面的内容添加到你的 `.bashrc`,`.zshrc` 或者其他 profile 文件中。 83 | ```bash varcode 84 | export RUSTUP_DIST_SERVER="${_http}://${_domain}/rustup" 85 | export RUSTUP_UPDATE_ROOT="${_http}://${_domain}/rustup/rustup" 86 | ``` 87 | -------------------------------------------------------------------------------- /.github/workflows/lint.yaml: -------------------------------------------------------------------------------- 1 | name: Lint 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - '**/*.md' 7 | 8 | jobs: 9 | markdownlint: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout code 13 | uses: actions/checkout@v5 14 | with: 15 | fetch-depth: 0 16 | 17 | - name: Get changed files 18 | id: changed-files 19 | uses: tj-actions/changed-files@v45 20 | with: 21 | files: '**/*.md' 22 | 23 | - name: Lint Markdown files 24 | uses: DavidAnson/markdownlint-cli2-action@v20 25 | if: steps.changed-files.outputs.any_changed == 'true' 26 | with: 27 | globs: ${{ steps.changed-files.outputs.all_changed_files }} 28 | separator: "," 29 | 30 | zhlint: 31 | runs-on: ubuntu-latest 32 | steps: 33 | - name: Checkout code 34 | uses: actions/checkout@v4 35 | 36 | - name: Install zhlint 37 | run: yarn global add zhlint 38 | 39 | - name: Get changed files 40 | id: changed-files 41 | uses: tj-actions/changed-files@v45 42 | with: 43 | files: '**/*.md' 44 | 45 | - name: Lint Markdown files 46 | env: 47 | ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} 48 | run: | 49 | mkdir -p linted_output 50 | file_list="linted_output/file_list.txt" 51 | linted_failed=0 52 | for file in ${{ env.ALL_CHANGED_FILES }}; do 53 | set +e 54 | zhlint --config "$GITHUB_WORKSPACE"/ci/.zhlintrc "$file" 55 | if [ $? -ne 0 ]; then 56 | linted_failed=1 57 | echo "$file" >> "$file_list" 58 | output_file="linted_output/report_and_suggested_fixes/$file" 59 | mkdir -p "$(dirname "$output_file")" 60 | zhlint --config "$GITHUB_WORKSPACE"/ci/.zhlintrc "$file" --output="$output_file" > "$output_file.log" 2>&1 61 | fi 62 | set -e 63 | done 64 | echo "linted_failed=$linted_failed" >> "$GITHUB_ENV" 65 | 66 | - name: Upload Linted Markdown 67 | uses: actions/upload-artifact@v4 68 | with: 69 | name: linted-markdown 70 | path: linted_output/ 71 | 72 | - name: Check lint errors 73 | run: | 74 | set -e 75 | if [ "${{ env.linted_failed }}" -ne 0 ]; then 76 | echo "Linting errors found. Please check the reports and suggested fixes in uploaded artifact." 77 | cat "$output_file" 78 | exit 1 79 | fi 80 | -------------------------------------------------------------------------------- /src/theme/DocItem/Layout/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import clsx from 'clsx'; 3 | import {useWindowSize} from '@docusaurus/theme-common'; 4 | import {useDoc} from '@docusaurus/plugin-content-docs/client'; 5 | import DocItemPaginator from '@theme/DocItem/Paginator'; 6 | import DocVersionBanner from '@theme/DocVersionBanner'; 7 | import DocVersionBadge from '@theme/DocVersionBadge'; 8 | import DocItemFooter from '@theme/DocItem/Footer'; 9 | import DocItemTOCMobile from '@theme/DocItem/TOC/Mobile'; 10 | import DocItemTOCDesktop from '@theme/DocItem/TOC/Desktop'; 11 | import DocItemContent from '@theme/DocItem/Content'; 12 | import DocBreadcrumbs from '@theme/DocBreadcrumbs'; 13 | import ContentVisibility from '@theme/ContentVisibility'; 14 | import type {Props} from '@theme/DocItem/Layout'; 15 | 16 | import styles from './styles.module.css'; 17 | import GlobalOptions from '@site/src/components/DocGlobalOptions'; 18 | 19 | /** 20 | * Decide if the toc should be rendered, on mobile or desktop viewports 21 | */ 22 | function useDocTOC() { 23 | const {frontMatter, toc} = useDoc(); 24 | const windowSize = useWindowSize(); 25 | 26 | const hidden = frontMatter.hide_table_of_contents; 27 | const canRender = !hidden && toc.length > 0; 28 | 29 | const mobile = canRender ? : undefined; 30 | 31 | const desktop = 32 | canRender && (windowSize === 'desktop' || windowSize === 'ssr') ? ( 33 | 34 | ) : undefined; 35 | 36 | return { 37 | hidden, 38 | mobile, 39 | desktop, 40 | }; 41 | } 42 | 43 | export default function DocItemLayout({children}: Props): JSX.Element { 44 | const docTOC = useDocTOC(); 45 | const {metadata} = useDoc(); 46 | const windowSize = useWindowSize(); 47 | return ( 48 |
49 |
50 | 51 | 52 |
53 |
54 | 55 | 56 | {docTOC.mobile} 57 | {windowSize == 'mobile' && } 58 | {children} 59 | 60 |
61 | 62 |
63 |
64 | {docTOC.desktop &&
65 | 66 | {docTOC.desktop} 67 |
} 68 |
69 | ); 70 | } 71 | -------------------------------------------------------------------------------- /docs/msys2.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: MSYS2 3 | title: MSYS2 软件仓库镜像使用帮助 4 | cname: 'MSYS2' 5 | --- 6 | 7 | ## MSYS2 简介与使用场景 8 | 9 | MSYS2 是一个用于 Windows 的软件发行版,提供了一个类似于 Unix 的环境。它基于现代的 Cygwin 和 MinGW-w64 项目,旨在为开发人员提供一个强大的构建和开发平台。MSYS2 使用 `pacman` 包管理器(与 Arch Linux 相同),可以方便地安装、更新和管理软件包。它提供了与 Unix 系统类似的环境,使得在 Windows 上进行跨平台开发变得更加容易。MSYS2 包含了大量的预编译软件包,包括编译器、库和工具等。 10 | 11 | ## 收录架构 12 | 13 | - MinGW: i686, x86_64, ucrt64, clang64 14 | - MSYS: i686, x86_64 15 | 16 | ## MSYS2 的下载与安装 17 | 18 | 请访问镜像目录下的 distrib/ 目录: 19 | 20 | ### x86_64 21 | 22 | 23 | 24 | 25 | 26 | ### i686 27 | 28 | 29 | 30 | 31 | 32 | 33 | ### 使用细节 34 | 35 | 找到名为 `msys2-<架构>-<日期>.exe` 的文件(如 `msys2-x86_64-20141113.exe`),下载安装即可。 36 | 37 | ## MSYS2 内的 pacman 配置 38 | 39 | :::caution 40 | **为避免软件源配置文件替换后产生问题,请先将系统自带的软件源配置文件进行备份,然后进行下列操作。** 41 | ::: 42 | 43 | ## 手动换源 44 | 45 | 1. **编辑 `/etc/pacman.d/mirrorlist.mingw32` 文件**: 46 | 在文件开头添加以下内容: 47 | 48 | ```bash varcode 49 | Server = ${_http}://${_domain}/msys2/mingw/i686 50 | ``` 51 | 52 | 2. **编辑 `/etc/pacman.d/mirrorlist.mingw64` 文件**: 53 | 在文件开头添加以下内容: 54 | 55 | ```bash varcode 56 | Server = ${_http}://${_domain}/msys2/mingw/x86_64 57 | ``` 58 | 59 | 3. **编辑 `/etc/pacman.d/mirrorlist.msys` 文件**: 60 | 在文件开头添加以下内容: 61 | 62 | ```bash varcode 63 | Server = ${_http}://${_domain}/msys2/msys/$arch 64 | ``` 65 | 66 | 4. **编辑 `/etc/pacman.d/mirrorlist.ucrt64` 文件**: 67 | 在文件开头添加以下内容: 68 | 69 | ```bash varcode 70 | Server = ${_http}://${_domain}/msys2/mingw/ucrt64 71 | ``` 72 | 73 | 5. **刷新软件包数据库**: 74 | 75 | ```shell varcode 76 | [ ] (root) 是否为 root 用户 77 | --- 78 | const SUDO = !root ? 'sudo ' : ''; 79 | --- 80 | ${SUDO}pacman -Sy 81 | ``` 82 | 83 | 通过这些步骤,你可以将 MSYS2 的镜像源更改为华中科技大学的镜像站,从而加速软件包的下载和更新。 84 | 85 | ## 一键换源 86 | 87 | :::caution 88 | 本方法仅适用于从官方源更换到本站源,如果您已经换过了源,请勿使用下列命令。 89 | ::: 90 | 91 | 你可以使用以下命令一键更换 MSYS2 的镜像源为华中科技大学的镜像站: 92 | 93 | ```shell varcode 94 | [ ] (root) 是否为 root 用户 95 | --- 96 | const SUDO = !root ? 'sudo ' : ''; 97 | --- 98 | ${SUDO}sed -i "s#https\\?://mirror.msys2.org/#${_http}://${_domain}/msys2/#g" /etc/pacman.d/mirrorlist* 99 | 100 | ``` 101 | 102 | ## 引用 103 | 104 | 1. [MSYS2 镜像站使用帮助 | 阿里云开源镜像站](https://developer.aliyun.com/mirror/msys2) 105 | 2. [MSYS2 镜像站使用帮助 | 清华大学开源软件镜像站](https://mirrors.tuna.tsinghua.edu.cn/help/msys2/) 106 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-blog/2024/02-08-mirrorz.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Integration of MirrorZ Documentation 3 | authors: chengzi 4 | --- 5 | 6 | Currently, our mirror site is lacking some documentation. In addition, as we synchronize more mirror sources in the future and these mirror sources are constantly updated, we will have to spend a great deal of time maintaining the documentation. 7 | We hope to integrate the documentation of some less popular mirror sources on our site with that of MirrorZ, so as to provide better services for our users. 8 | After the integration, we expect to utilize the more frequently updated and newer documentation of MirrorZ to help users make better use of our mirror site. 9 | 10 | 11 | 12 | ## Integration Methods 13 | 14 | According to the Readme of MirrorZ, we can integrate MirrorZ's documentation in the following ways: 15 | 16 | - link in the mirror frontend e.g., ISCAS, SJTUG and SDU 17 | - link in the mirror help e.g., NWAFU 18 | - Fork/Rebase and Transpile mdx to local markdown e.g., TUNA/BFSU 19 | - Self-host e.g., xtom.help 20 | - Reverse proxy e.g., NJU 21 | 22 | We have taken the following points into consideration: 23 | 1. We hope that when users browse our mirror site, they can directly access the documentation of MirrorZ without having to jump to other sites. 24 | 2. We hope that when users read the documentation of MirrorZ, they can have an experience similar to that of the documentation we maintain. 25 | 3. We hope to make some customized modifications to the documentation of MirrorZ, such as modifying the addresses of hyperlinks to adapt to our site. 26 | Based on the above requirements, we have decided to integrate the documentation of MirrorZ using the third method 27 | 28 | ## Scheme 29 | 30 | The script we write will follow these steps to integrate the documentation of MirrorZ: 31 | 32 | 1. Download the documentation of MirrorZ. 33 | 2. Convert the documentation of MirrorZ to the format of our site. 34 | 3. Replace the addresses of hyperlinks. 35 | 4. Replace the metadata in the front matter part of markdown. 36 | 5. Add a source tip and the original link. 37 | 38 | In addition, we also need to write an update script to assist in the synchronization with the upstream documentation later. 39 | 40 | ## Implementation 41 | 42 | We have implemented two scripts, one for downloading and generating the documentation of MirrorZ, and the other for updating the documentation of MirrorZ. The specific implementation can be referred to the scripts directory in the site directory. The usage can be referred to the Readme. 43 | In the future, we will consider using tools similar to Github Actions to automate the update process, so that the documentation can be updated regularly and kept in sync with the upstream. 44 | -------------------------------------------------------------------------------- /plugin/cgit.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | const fs = require('fs/promises') 3 | const { JSDOM } = require('jsdom'); 4 | var crypto = require('crypto'); 5 | var uglify = require("uglify-js"); 6 | 7 | function getFileName(scriptStr, ext = ".js") { 8 | var hash = crypto.createHash('md5').update(scriptStr).digest('hex').substring(0, 8); 9 | return "cgit." + hash + ext; 10 | } 11 | 12 | /** @type {import('@docusaurus/types').Plugin} */ 13 | const fancyindexPlugin = { 14 | name: 'cgit-processor', 15 | postBuild: async (props) => { 16 | const dir = props.outDir + '/cgit'; 17 | const inputFile = dir + '/index.html'; 18 | 19 | const srcDir = `${props.siteDir}/src/pages/cgit`; 20 | const srcClientJsFile = `${srcDir}/_client.js`; 21 | const srcHeadHtmlFile = `${srcDir}/_head.html`; 22 | const srcCgitCssFile = `${srcDir}/_cgit.css`; 23 | 24 | const outputHeadFile = dir + '/head.html'; 25 | const outputHeaderFile = dir + '/header.html'; 26 | const outputFooterFile = dir + '/footer.html'; 27 | 28 | let outputHead = "", outputHeader = "", outputFooter = ""; 29 | 30 | 31 | const dom = await JSDOM.fromFile(inputFile); 32 | const document = dom.window.document; 33 | 34 | outputHead += await fs.readFile(srcHeadHtmlFile, 'utf-8'); 35 | 36 | // get link to stylesheet in head 37 | document.head.querySelectorAll('link[rel="stylesheet"]').forEach((el) => { 38 | outputHead += el.outerHTML; 39 | }); 40 | 41 | const cssCode = await fs.readFile(srcCgitCssFile, 'utf-8'); 42 | const cssFile = getFileName(cssCode, ".css"); 43 | outputHead += ``; 44 | 45 | const nav = document.body.querySelector("nav"); 46 | nav.querySelector(".navbar__item.dropdown.dropdown--hoverable.dropdown--right").remove(); 47 | if (nav) { 48 | outputHeader += nav.outerHTML; 49 | } 50 | 51 | const footer = document.body.querySelector("footer"); 52 | if (footer) { 53 | outputFooter += footer.outerHTML; 54 | } 55 | 56 | const jsCode = uglify.minify(await fs.readFile(srcClientJsFile, 'utf-8')).code; 57 | const jsFileName = getFileName(jsCode); 58 | 59 | const bodyScript = document.body.querySelector('script'); 60 | 61 | if (bodyScript) { 62 | outputFooter += bodyScript.outerHTML; 63 | } 64 | 65 | outputFooter += ``; 66 | 67 | await fs.writeFile(`${dir}/${jsFileName}`, jsCode); 68 | await fs.writeFile(`${dir}/${cssFile}`, cssCode); 69 | await fs.writeFile(outputHeadFile, outputHead); 70 | await fs.writeFile(outputHeaderFile, outputHeader); 71 | await fs.writeFile(outputFooterFile, outputFooter); 72 | await fs.rm(inputFile); 73 | }, 74 | } 75 | 76 | module.exports = () => fancyindexPlugin; 77 | -------------------------------------------------------------------------------- /ci/gen-releases.py: -------------------------------------------------------------------------------- 1 | #!/bin/env python3 2 | # Usage: gen-releases.py ... 3 | 4 | from configparser import ConfigParser 5 | from glob import glob 6 | import re, sys, os, json 7 | 8 | config = ConfigParser() 9 | 10 | script_path = os.path.dirname(os.path.realpath(__file__)) 11 | config.read(script_path + "/releases.conf", encoding="utf-8") 12 | mirror_dirs = sys.argv[1:-1] 13 | output_file = sys.argv[-1] 14 | 15 | result = [] 16 | 17 | 18 | def get_compare_file_key(f: str): 19 | for mirror_dir in mirror_dirs: 20 | _f = os.path.join(mirror_dir, f) 21 | f = _f if os.path.exists(_f) else f 22 | if not os.path.exists(f): 23 | return 0 24 | return os.path.getmtime(f) 25 | 26 | 27 | for sec in config.sections(): 28 | release_sec = config[sec]["name"] if "name" in config[sec] else sec 29 | exp = config[sec]["exp"] 30 | release_pos = int(config[sec]["release"]) if "release" in config[sec] else -1 31 | version_pos = int(config[sec]["version"]) if "version" in config[sec] else -1 32 | variant_pos = int(config[sec]["variant"]) if "variant" in config[sec] else -1 33 | take_count = int(config[sec]["take"]) if "take" in config[sec] else -1 34 | description = config[sec]["description"] if "description" in config[sec] else None 35 | 36 | print("Generating " + release_sec + " with " + exp, file=sys.stderr) 37 | 38 | # get all directories and files under mirror_dir 39 | # and filter out the ones that match the regex 40 | files = [] 41 | for mirror_dir in mirror_dirs: 42 | files.extend( 43 | list(glob(config[sec]["path"], root_dir=mirror_dir, recursive=True)) 44 | ) 45 | 46 | if take_count != -1: 47 | # order files by date 48 | files.sort(key=get_compare_file_key, reverse=True) 49 | 50 | count = 0 51 | for file in files: 52 | release = release_sec 53 | version = "" 54 | variant = "" 55 | matches = re.match(exp, file) 56 | if matches: 57 | release = matches.group(release_pos) if release_pos != -1 else release_sec 58 | version = matches.group(version_pos) if version_pos != -1 else None 59 | variant = matches.group(variant_pos) if variant_pos != -1 else None 60 | d = { 61 | "release": release, 62 | "version": version, 63 | "variant": variant, 64 | "path": file, 65 | "description": description, 66 | } 67 | d = {k: v for k, v in d.items() if v is not None} 68 | result.append(d) 69 | count += 1 70 | if take_count != -1 and count >= take_count: 71 | break 72 | 73 | with open(output_file, "w") as f: 74 | f.write(json.dumps(result)) 75 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-docs/current/ubuntukylin.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Ubuntu Kylin Mirror Usage Guide 3 | sidebar_label: UbuntuKylin 4 | --- 5 | 6 | ## About Ubuntu Kylin and Software Management 7 | 8 | Ubuntu Kylin is a Linux distribution based on Ubuntu, led by Kylin Software Co., Ltd., and is one of the official Ubuntu derivatives. 9 | It focuses on developing a "user-friendly, simple and easy-to-use" desktop environment, committed to providing a smarter user experience for global users. 10 | 11 | Ubuntu Kylin uses the `APT` package management tool to manage DEB packages. 12 | Its software sources consist of two parts: 13 | - One part is the Ubuntu software repository. 14 | - The other part is the Ubuntu Kylin software repository. 15 | 16 | ## Ubuntu Official Software Source Replacement 17 | 18 | :::info 19 | Apart from Ubuntu Kylin's software sources, Ubuntu Kylin shares the same software sources with Ubuntu. Please directly refer to the [Ubuntu documentation](./ubuntu). 20 | 21 | ::: 22 | 23 | :::caution 24 | Note that Ubuntu Kylin may have pre-replaced Ubuntu sources with Alibaba Cloud during installation. Please do not refer to the "One-click Source Replacement" section in the Ubuntu documentation. 25 | ::: 26 | 27 | Click [here](./ubuntu) to view the Ubuntu software source replacement method. 28 | 29 | ## Ubuntu Kylin Official Software Source Replacement 30 | 31 | :::caution 32 | **To avoid issues after replacing the software source configuration files, please back up the system's original software source configuration files before proceeding with the following operations.** 33 | ::: 34 | 35 | 1. Adjust the following options according to your situation, and use the following software source configuration to replace the original content in `/etc/apt/sources.list.d/ukui.list` and 36 | `/etc/apt/sources.list.d/software.list`: 37 | 38 | ```bash varcode title=/etc/apt/sources.list.d/ukui.list 39 | [ ] (version) { jammy:22.04 LTS, groovy:20.10, focal:20.04 LTS } Ubuntu Kylin Version 40 | --- 41 | deb ${_http}://${_domain}/ubuntukylin/ ${version} main 42 | ``` 43 | 44 | ```bash varcode title=/etc/apt/sources.list.d/software.list 45 | [ ] (version) { jammy:22.04 LTS, groovy:20.10, focal:20.04 LTS } Ubuntu Kylin Version 46 | --- 47 | deb ${_http}://${_domain}/ubuntukylin/ ${version}-partner main 48 | ``` 49 | 50 | 2. Update software using the following command: 51 | 52 | ```shell varcode 53 | [ ] (root) Is root user? 54 | --- 55 | const SUDO = !root ? 'sudo ' : ''; 56 | --- 57 | ${SUDO}apt update 58 | ``` 59 | 60 | ## Image Download {#image} 61 | 62 | This mirror site synchronizes Ubuntu Kylin installation images. 63 | 64 | Please click the button below, then select the appropriate version to download and install. 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /docs/termux.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Termux 软件仓库镜像使用帮助 3 | sidebar_label: Termux 4 | cname: termux 5 | --- 6 | 7 | 8 | ## Termux 是什么 9 | 10 | Termux 是运行在 Android 上的 terminal。不需要 root,运行于内部存储(不在 SD 卡上)。 11 | 12 | 自带了一个包管理器,可以安装许多现代化的开发和系统维护工具。比如: 13 | 14 | * neovim 15 | * tmux 16 | * zsh 17 | * clang 18 | * gcc 19 | * weechat 20 | * irssi 21 | * ... 22 | 23 | ## 如何使用 Termux 镜像 24 | 25 | 26 | ### 图形界面(TUI)替换 27 | 28 | 在较新版的 Termux 中,官方提供了图形界面(TUI)来半自动替换镜像,推荐使用该种方式以规避其他风险。 29 | * 需要先把 termux-tools 更新到 1.42.1 版本。 30 | 在 Termux 中执行如下命令 31 | 32 | ```bash 33 | apt update && apt upgrade termux-tools 34 | termux-change-repo 35 | ``` 36 | 37 | 在图形界面引导下,使用自带方向键可上下移动。 38 | 第一步使用空格选择 Single Mirror,之后在第二步选择 mirrors.hust.edu.cn 镜像源。确认无误后回车,镜像源会自动完成更换。 39 | 40 | ### 命令行替换 41 | 42 | 43 | 使用如下命令行替换官方源为镜像源。 44 | 45 | ```bash varcode 46 | --- 47 | --- 48 | sed -i 's@^\\(deb.*stable main\\)$@#\\1\\ndeb ${_http}://${_domain}/termux/apt/termux-main stable main@' $PREFIX/etc/apt/sources.list 49 | apt update && apt upgrade 50 | ``` 51 | 52 | 使用如下命令行替换社区源 x11-repo 为镜像源(如果已经启用)。 53 | 54 | ```bash varcode 55 | --- 56 | --- 57 | sed -i 's@^\\(deb.*x11 main\\)$@#\\1\\ndeb ${_http}://${_domain}/termux/apt/termux-x11 x11 main @' $PREFIX/etc/apt/sources.list.d/x11.list 58 | apt update && apt upgrade 59 | ``` 60 | 使用如下命令行替换社区源 root-repo 为镜像源(如果已经启用)。 61 | 62 | ```bash varcode 63 | --- 64 | --- 65 | sed -i 's@^\\(deb.*root main\\)$@#\\1\\ndeb ${_http}://${_domain}/termux/apt/termux-root root main @' $PREFIX/etc/apt/sources.list.d/root.list 66 | apt update && apt upgrade 67 | ``` 68 | 69 | ### 手动修改 70 | 71 | 替换官方源为镜像源,需要编辑 `$PREFIX/etc/apt/sources.list` 修改为如下内容 72 | 73 | ```properties varcode title="$PREFIX/etc/apt/sources.list" 74 | --- 75 | --- 76 | # The termux repository mirror 77 | deb ${_http}://${_domain}/termux/apt/termux-main stable main 78 | ``` 79 | 80 | 替换社区源 x11-repo 为镜像源,需要编辑 `$PREFIX/etc/apt/sources.list.d/x11.list` 修改为如下内容 81 | 82 | ```properties varcode title="$PREFIX/etc/apt/sources.list.d/x11.list" 83 | --- 84 | --- 85 | # The termux repository mirror 86 | deb ${_http}://${_domain}/termux/apt/termux-x11 x11 main 87 | ``` 88 | 89 | 替换社区源 root-repo 为镜像源,需要编辑 `$PREFIX/etc/apt/sources.list.d/root.list` 修改为如下内容 90 | 91 | 92 | ```properties varcode title="$PREFIX/etc/apt/sources.list.d/root.list.d/root.list" 93 | --- 94 | --- 95 | # The termux repository mirror 96 | deb ${_http}://${_domain}/termux/apt/termux-root root stable 97 | ``` 98 | 99 | 请使用内置或安装在 Termux 里的文本编辑器,例如 `vi` / `vim` / `nano` 等,**不要使用 RE 管理器等其他具有 ROOT 权限的外部 APP** 来修改 Termux 的文件 100 | 101 | 注:Termux 会自动将环境变量 `$PREFIX` 设定为 `/data/data/com.termux/files/usr` 102 | 103 | ### 警告 104 | 105 | * 镜像仅适用于 Android 7.0 (API 24) 及以上版本,旧版本系统使用本镜像可能导致程序错误。 106 | * Google Play 上的 Termux 已被弃用,如安装会产生兼容性问题。请通过 GitHub 或 F-Droid 来安装 Termux。 107 | -------------------------------------------------------------------------------- /static/icons/settings.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-docs/current/blackarch.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Black Arch 3 | sidebar_label: BlackArch 4 | cname: 'blackarch' 5 | --- 6 | 7 | ## Introduction to BlackArch and Software Management 8 | BlackArch Linux is an Arch Linux-based penetration testing distribution for penetration testers and security researchers. The repository contains over 3000 tools that can be installed individually or in groups. 9 | BlackArch Linux is compatible with existing Arch Linux installations and allows software installation from BlackArch repository using pacman. 10 | 11 | ## Replacing BlackArch Software Sources 12 | 13 | :::caution 14 | **To avoid problems when replacing software source configuration files, please make a backup of the system's default software source configuration files before proceeding.** 15 | ::: 16 | 17 | 1. Edit `/etc/pacman.d/mirrorlist` and add the following lines to the end of the file: 18 | 19 | ```ini varcode 20 | --- 21 | --- 22 | [blackarch] 23 | Server = ${_http}://${_domain}/blackarch/$repo/os/$arch 24 | ``` 25 | 26 | :::caution 27 | Some software depends on 32-bit libraries. You need to uncomment `multilib` in `/etc/pacman.conf`. For details, see https://wiki.archlinux.org/index.php/Official_repositories#Enabling_multilib 28 | ::: 29 | 30 | 2. Install the `blackarch-keyring` package to import the GPG key. 31 | 32 | ```shell varcode 33 | [ ] (root) Are you the root user? 34 | --- 35 | const SUDO = !root ? 'sudo ' : ''; 36 | --- 37 | ${SUDO}pacman -Sy blackarch-keyring 38 | ``` 39 | 40 | 3. Update the package cache with the following command: 41 | 42 | ```shell varcode 43 | [ ] (root) Are you the root user? 44 | --- 45 | const SUDO = !root ? 'sudo ' : ''; 46 | --- 47 | ${SUDO}pacman -Syyu 48 | ``` 49 | 50 | The `yy` in the command helps prevent issues when switching from **broken** mirrors to **healthy** mirrors. 51 | 52 | If you want to switch from a newer mirror to an older mirror, you can execute the following command to downgrade some packages and avoid partial updates to the system: 53 | 54 | ```shell varcode 55 | [ ] (root) Are you the root user? 56 | --- 57 | const SUDO = !root ? 'sudo ' : ''; 58 | --- 59 | ${SUDO}pacman -Syyuu 60 | ``` 61 | 62 | ## One-Click Source Replacement 63 | 64 | :::caution 65 | This method is only applicable when switching from official sources to the mirror sources on this site. If you have already switched sources, please do not use the following commands. 66 | ::: 67 | 68 | Use the `echo` command to add the current mirror source in one step: 69 | ```shell varcode 70 | [ ] (root) Are you the root user? 71 | --- 72 | const SUDO = !root ? 'sudo ' : ''; 73 | --- 74 | ${SUDO}echo "[blackarch] 75 | Server = ${_http}://${_domain}/blackarch/$repo/os/$arch" >> /etc/pacman.conf 76 | ``` 77 | 78 | Note: The BlackArch software source only contains tools and other software packaged by it. If you need to replace the software source for the Arch Linux system, please refer to [Arch Linux Help](/docs/archlinux/). 79 | 80 | ## References 81 | 82 | 1. [BlackArch Wikipedia](https://en.wikipedia.org/wiki/BlackArch) 83 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-docs/current/pypi.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: PyPI 3 | title: PyPI 4 | --- 5 | 6 | ## Introduction to PyPI 7 | 8 | PyPI (The Python Package Index), code-hosted at [https://pypi.org/](https://pypi.org/), is the official third-party software repository for the Python programming language. 9 | 10 | ## Switching pip Package Mirror 11 | 12 | :::caution 13 | The pip tool only supports https by default, please do not use http. 14 | ::: 15 | 16 | :::info About externally-managed-environment Error 17 | Python 3.11 had implemented PEP 668, which is a significant proposal enhancing the Python packages to specify whether they can be installed in the global interpreter context by default. 18 | Encountering such kind of issue, you could try creating a virtual environment using venv, or use other virtual-environment-based package managers. 19 | ::: 20 | 21 | ### Temporary Usage 22 | 23 | ```bash varcode 24 | pip install -i https://${_domain}/pypi/web/simple 25 | ``` 26 | 27 | ### Set as Default 28 | 29 | ```bash varcode 30 | pip config set global.index-url https://${_domain}/pypi/web/simple 31 | ``` 32 | 33 | :::caution 34 | Please upgrade pip to version 10 or above before configuring. 35 | ::: 36 | 37 | If the pip version is low, you can use the following command to upgrade pip 38 | ```bash varcode 39 | python -m pip install -i https://${_domain}/pypi/web/simple --upgrade pip 40 | ``` 41 | 42 | ## Switching PDM Package Mirror 43 | 44 | PDM supports configuring the package mirror using the `pdm config` command or environment variables. For long-term use, it is recommended to configure it through `pdm config`. 45 | 46 | Config the package mirror using the `pdm config` command: 47 | ```bash varcode 48 | pdm config pypi.url https://${_domain}/pypi/web/simple 49 | ``` 50 | 51 | Or config the PDM package mirror using environment variables: 52 | ```bash varcode 53 | export PDM_PYPI_URL=https://${_domain}/pypi/web/simple 54 | ``` 55 | 56 | ## Switching Poetry Package Mirror 57 | 58 | :::caution 59 | Poetry only supports project-specific configuration, instead of configuring a global mirror. 60 | ::: 61 | 62 | Poetry supports configuring the current project's package mirror using the `poetry source` command or by modifying `pyproject.toml`. 63 | 64 | Config the package mirror using the `poetry source` command: 65 | ```bash varcode 66 | poetry source add --priority=primary mirrors https://${_domain}/pypi/web/simple 67 | ``` 68 | 69 | Or modify `pyproject.toml` to config the package mirror, add the following content to the `pyproject.toml` file: 70 | ```toml varcode 71 | [[tool.poetry.source]] 72 | name = "mirrors" 73 | url = "https://${_domain}/pypi/web/simple" 74 | priority = "primary" 75 | ``` 76 | 77 | ## Switching pipx Package Mirror 78 | 79 | pipx uses the same mirror as pip by default, so the method of configuring the package mirror is the same as pip. 80 | 81 | ## Switching Back to Default Mirror 82 | 83 | If you want to use the official default mirror, change the mirror url in the above commands to `https://pypi.org/simple` and configure it in the same way. 84 | -------------------------------------------------------------------------------- /src/pages/index.module.css: -------------------------------------------------------------------------------- 1 | /** 2 | * CSS files with the .module.css suffix will be treated as CSS modules 3 | * and scoped locally. 4 | */ 5 | 6 | .heroBanner { 7 | padding: 2rem 0; 8 | text-align: center; 9 | position: relative; 10 | } 11 | 12 | @media screen and (max-width: 996px) { 13 | .heroBanner { 14 | padding: 4px; 15 | } 16 | } 17 | 18 | .buttons { 19 | display: flex; 20 | align-items: center; 21 | justify-content: center; 22 | position: absolute; 23 | bottom: 0; 24 | right: 0; 25 | } 26 | 27 | .list-container { 28 | display: flex; 29 | justify-content: center; 30 | align-items: flex-start; 31 | } 32 | 33 | .table-container { 34 | margin: 32px; 35 | flex: 1 0; 36 | max-width: 1034px; 37 | display: flex; 38 | justify-content: center; 39 | } 40 | 41 | .sidebar-container { 42 | margin: 32px 32px 32px 0; 43 | width: 400px; 44 | } 45 | 46 | .header-container { 47 | display: flex; 48 | margin: 0 auto; 49 | justify-content: center; 50 | width: 100%; 51 | max-width: 1530px; 52 | } 53 | 54 | .header-container .main-part { 55 | margin: 32px; 56 | flex: 1 1 0; 57 | display: flex; 58 | flex-direction: column; 59 | justify-content: space-between; 60 | } 61 | 62 | .header-container .cli-ad-container { 63 | margin: 32px; 64 | flex: 1 1 0; 65 | min-width: 0; 66 | position: relative; 67 | } 68 | 69 | 70 | .header-container .left { 71 | text-align: left; 72 | } 73 | 74 | .search { 75 | display: block; 76 | font-size: 1.5em; 77 | padding: 16px; 78 | background: transparent; 79 | border: var(--ifm-hero-text-color) solid 2px; 80 | border-radius: 8px; 81 | transition: all 0.3s; 82 | outline: none; 83 | caret-color: var(--ifm-hero-text-color); 84 | color: var(--ifm-color-black); 85 | max-width: 480px; 86 | } 87 | 88 | .search::placeholder { 89 | color: var(--ifm-hero-text-color) 90 | } 91 | 92 | .search:not(:placeholder-shown) { 93 | background: var(--ifm-hero-text-color); 94 | caret-color: var(--ifm-color-black); 95 | } 96 | 97 | .search:focus { 98 | background: var(--ifm-hero-text-color); 99 | caret-color: var(--ifm-color-black); 100 | } 101 | 102 | 103 | @media screen and (max-width:1200px) { 104 | .sidebar-container { 105 | width: 300px; 106 | } 107 | } 108 | 109 | @media screen and (max-width:996px) { 110 | .sidebar-container { 111 | margin: 16px; 112 | } 113 | 114 | .list-container { 115 | flex-wrap: wrap; 116 | } 117 | 118 | .table-container { 119 | margin: 0; 120 | } 121 | 122 | .header-container { 123 | flex-direction: column-reverse; 124 | } 125 | 126 | .header-container .main-part, 127 | .header-container .cli-ad-container { 128 | margin: 16px; 129 | } 130 | } 131 | 132 | @media screen and (max-width:800px) { 133 | .sidebar-container { 134 | width: 100%; 135 | } 136 | } 137 | 138 | /* @media screen and (min-width:800px) and (min-height: 800px) { */ 139 | /* .sidebar-container { */ 140 | /* position: sticky; */ 141 | /* top: 92px; */ 142 | /* } */ 143 | /* } */ 144 | -------------------------------------------------------------------------------- /docs/linuxmint.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Linux Mint 镜像使用帮助 3 | sidebar_label: Linux Mint 4 | cname: LinuxMint 5 | type: OS 6 | detection: 7 | checks: 8 | - type: os_release 9 | name: Linux Mint 10 | --- 11 | 12 | ## Linux Mint 简介与软件管理 13 | Linux Mint 是一种基于 Ubuntu 的 Linux 发行版,Linux Mint 的宗旨是提供一个免费开源、现代、优雅、功能强大却也易于使用的作业系统 14 | Linux Mint 也采用 apt 作为包管理器,与 Ubuntu 和 Debian 类似,你需要编辑 `/etc/apt/sources.list` 和 `/etc/apt/sources.list.d/*` 中的路径。 15 | 16 | 17 | ## Ubuntu / Debian 软件源替换 18 | 19 | 对于来自 Ubuntu 与 Debian 的部分源,可以参考 [Ubuntu 帮助](./ubuntu)与 [Debian 帮助](./debian)进行修改。 20 | 21 | ## Linux Mint 软件源替换 22 | 23 | ### 一键换源 24 | 25 | :::caution 26 | 本方法仅适用于从官方源更换到本站源,如果您已经换过了源,请勿使用下列命令。 27 | ::: 28 | 29 | 使用 `sed` 命令将软件源配置文件中的默认源地址 [http://packages.linuxmint.com](http://packages.linuxmint.com) 直接替换为当前镜像源站 30 | 31 | ```yaml cli 32 | type: ReplaceIfExist 33 | required: true 34 | optional: false 35 | description: 替换Linux Mint主仓库 36 | privileged: true 37 | files: 38 | - path: /etc/apt/offical-package-repositories.list 39 | match: 'http://packages.linuxmint.com' 40 | replace: '${_http}://${_domain}/linuxmint' 41 | - path: /etc/apt/offical-package-repositories.list 42 | match: 'http://archive.ubuntu.com' 43 | replace: '${_http}://${_domain}' 44 | display_policy: 45 | kind: All 46 | ``` 47 | 48 | :::caution 49 | **为避免软件源配置文件替换后产生问题,请先将系统自带的软件源配置文件进行备份,然后进行下列操作。** 50 | ::: 51 | 52 | ### 1. 修改 `/etc/apt/sources.list.d/official-package-repositories.list`,把 `packages.linuxmint.com` 替换为镜像源 53 | 54 | ```list varcode 55 | [] (release) { zara:22.2, xia:22.1, wilma:22, virginia:21.3, victoria:21.2, vera:21.1, vanessa:21, una:20.3, uma:20.2, ulyssa:20.1 } Linux Mint 版本 56 | --- 57 | deb ${_http}://${_domain}/linuxmint ${release} main upstream import backport 58 | ``` 59 | 60 | ### 2. 通过如下命令更新软件。 61 | 62 | ```yaml cli 63 | type: Execute 64 | privileged: true 65 | interpreter: shell 66 | exec: | 67 | #{USE_IN_DOCS/} 68 | apt-get update 69 | #{/USE_IN_DOCS} 70 | ``` 71 | 72 | :::caution 73 | 完成后请不要再使用 mintsources(自带的图形化软件源设置工具)进行任何操作,因为在操作后,无论是否有按 “确定”,mintsources 均会复写 `/etc/apt/sources.list.d/official-package-repositories.list` 74 | ::: 75 | 76 | ## Linux Mint Security 源替换 77 | 78 | 由于 Linux Mint 的 Security 源采用的是和 Ubuntu 相同的源,因此可直接使用 Ubuntu 的 Security 源。但两者配置文件目录不同,不可直接使用 Ubuntu 文档中的换源命令。 79 | 80 | 修改 `/etc/apt/sources.list.d/official-package-repositories.list`,把 `security.ubuntu.com` 替换为镜像源 81 | 82 | ```list varcode 83 | [] (release) { noble:22, jammy:21 } Linux Mint 版本 84 | --- 85 | deb ${_http}://${_domain}/ubuntu ${release}-security main restricted universe multiverse 86 | ``` 87 | 88 | ## Linux Mint 安装镜像 {#cd} 89 | Linux Mint 安装镜像提供 cinnamon,mate 和 xfce 三种桌面环境,分别对应了三个版本的安装镜像。如果需 90 | 要下载这两个版本的安装镜像,点击下面的按钮选择对应的版本和种类进行下载。 91 | 92 | - cinnamon:Linux Mint 的默认桌面环境,基于 GNOME 3 开发。 93 | - mate:基于 GNOME 2 开发的桌面环境。 94 | - xfce:轻量级桌面环境,适合配置较低的计算机。 95 | 96 | 97 | 98 | 99 | 100 | ## 引用 101 | 1. [Tuna 镜像源使用帮助](https://mirrors.tuna.tsinghua.edu.cn/help/linuxmint/) 102 | -------------------------------------------------------------------------------- /ci/test/test-releases-rsync.py: -------------------------------------------------------------------------------- 1 | #!/bin/env python3 2 | # Usage: 3 | # test-releases-rsync.py --section
--rsync [--prefix ] [--strip ] [--follow-link] 4 | # Example: 5 | # python3 ./test-releases-rsync.py --section msys2 --rsync rsync://mirrors.tuna.tsinghua.edu.cn/msys2 --prefix msys2/ 6 | 7 | import argparse 8 | import fnmatch 9 | import os 10 | import re 11 | import time 12 | from configparser import ConfigParser 13 | from subprocess import PIPE, Popen, DEVNULL 14 | 15 | config = ConfigParser() 16 | 17 | script_path = os.path.dirname(os.path.realpath(__file__)) 18 | config.read(script_path + "/../releases.conf", encoding="utf-8") 19 | 20 | parser = argparse.ArgumentParser() 21 | parser.add_argument("--section", required=True) 22 | parser.add_argument("--rsync", required=True) 23 | parser.add_argument("--prefix", default="") 24 | parser.add_argument("--strip", type=int, default=0) 25 | parser.add_argument( 26 | "--follow-link", action=argparse.BooleanOptionalAction, default=True 27 | ) 28 | 29 | 30 | args = parser.parse_args() 31 | sec = args.section 32 | rsync_url = args.rsync 33 | prefix = args.prefix 34 | strip = args.strip 35 | follow_link = args.follow_link 36 | 37 | 38 | release_sec = config[sec]["name"] if "name" in config[sec] else sec 39 | exp = config[sec]["exp"] 40 | release_pos = int(config[sec]["release"]) if "release" in config[sec] else -1 41 | version_pos = int(config[sec]["version"]) if "version" in config[sec] else -1 42 | variant_pos = int(config[sec]["variant"]) if "variant" in config[sec] else -1 43 | take_count = int(config[sec]["take"]) if "take" in config[sec] else -1 44 | description = config[sec]["description"] if "description" in config[sec] else None 45 | glob_pattern = config[sec]["path"] 46 | 47 | 48 | def get_files(): 49 | args = ["rsync", "--no-motd", "--list-only", "--recursive", rsync_url] 50 | if follow_link: 51 | args.insert(1, "--copy-links") 52 | p = Popen(args, stdout=PIPE, stderr=DEVNULL) 53 | if p.stdout is None: 54 | return 55 | while p.poll() is None: 56 | line = p.stdout.readline().decode("utf-8").strip() 57 | parts = re.split(r"\s+", line) 58 | if len(parts) < 5: 59 | continue 60 | path = prefix + "/".join(parts[4].split("/")[strip:]) 61 | yield { 62 | "mode": parts[0], 63 | "size": parts[1], 64 | "time": time.strptime(parts[2] + " " + parts[3], "%Y/%m/%d %H:%M:%S"), 65 | "path": path, 66 | } 67 | 68 | 69 | def filter_files_in_glob(files): 70 | for file in files: 71 | if fnmatch.fnmatch(file["path"], glob_pattern): 72 | yield file 73 | 74 | 75 | count = 0 76 | for f in filter_files_in_glob(get_files()): 77 | file = f["path"] 78 | release = release_sec 79 | version = "" 80 | variant = "" 81 | matches = re.match(exp, file) 82 | if matches: 83 | release = matches.group(release_pos) if release_pos != -1 else release_sec 84 | version = matches.group(version_pos) if version_pos != -1 else "" 85 | variant = matches.group(variant_pos) if variant_pos != -1 else "" 86 | print("{:10}\t{:10}\t{:25}\t{}".format(release, version, variant, file)) 87 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-docs/current/openkylin.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: openKylin 3 | title: openKylin 4 | cname: 'openkylin' 5 | --- 6 | 7 | ## Introduction to openKylin and Software Management 8 | 9 | The openKylin community is an open-source community founded by basic software and hardware companies, non-profit organizations, community organizations, universities, research institutions, and individual developers. Its goal is to create a top-level desktop operating system community through the core principles of "collaboration" and "open-source convergence, co-creation of the future." It operates on the basis of open-source, voluntary participation, equality, and collaboration. The community collaborates with enterprises through open and open-source means to build a partner ecosystem and jointly create a top-level desktop operating system community, promoting the prosperity of Linux open-source technology and its hardware and software ecosystem. 10 | 11 | openKylin uses the APT package management tool to manage DEB software packages. Specifically, openKylin manages system software sources by modifying the `/etc/apt/sources.list` configuration file. In general, users can replace the default source address in this configuration file (i.e., `http://archive.build.openkylin.top/`) with the mirror source provided by this software mirror site. 12 | ## Replacing openKylin Software Sources 13 | 14 | :::caution 15 | **To avoid problems when replacing software source configuration files, please make a backup of the system's default software source configuration files before proceeding.** 16 | ::: 17 | 1. Based on your preference, copy the following software source configuration content to `/etc/apt/sources.list` and save it. 18 | 19 | ```shell varcode 20 | [ ] (version) { yangtze:1.0 } openKylin version 21 | --- 22 | deb ${_http}://${_domain}/openkylin ${version} main 23 | ``` 24 | 25 | 26 | 1. Update the software using the following command: 27 | 28 | ```shell varcode 29 | [ ] (root) Are you the root user? 30 | --- 31 | const SUDO = !root ? 'sudo ' : ''; 32 | --- 33 | ${SUDO}apt update 34 | ``` 35 | 36 | 37 | ## One-Click Source Replacement 38 | 39 | :::caution 40 | This method is only applicable when switching from official sources to the mirror sources on this site. If you have already switched sources, please do not use the following commands. 41 | ::: 42 | 43 | Use the `sed` command to directly replace the default source address [http://archive.build.openkylin.top/](http://archive.build.openkylin.top/) in the software source configuration file with the current mirror source site. 44 | 45 | ```shell varcode 46 | [ ] (root) Are you the root user? 47 | --- 48 | const SUDO = !root ? 'sudo ' : ''; 49 | --- 50 | ${SUDO}sed -i.bak 's|https?://([^/]+)/openkylin|${_http}://${_domain}/openkylin|' /etc/apt/sources.list 51 | ``` 52 | 53 | 54 | ## Important Notes 55 | - openKylin does not use HTTPS sources by default. If you choose to use HTTPS sources and encounter issues fetching HTTPS sources, you can install the following software using HTTP sources: 56 | 57 | ```shell varcode 58 | [ ] (root) Are you the root user? 59 | --- 60 | const SUDO = !root ? 'sudo ' : ''; 61 | --- 62 | ${SUDO}apt install apt-transport-https ca-certificates 63 | ${SUDO}apt update 64 | ``` 65 | -------------------------------------------------------------------------------- /i18n/en/docusaurus-plugin-content-docs/current/archlinuxcn.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Arch Linux CN 3 | title: Arch Linux CN Software Repository Mirror Usage Guide 4 | cname: 'archlinuxcn' 5 | --- 6 | 7 | ## Introduction to Arch Linux CN and Software Management 8 | 9 | The Arch Linux Chinese Community Repository, an unofficial software repository driven by the Arch Linux Chinese Community, includes many additional packages not provided by the official repositories, as well as git versions and other variants of existing software. Some of the packaging scripts for these packages originate from the AUR (Arch User Repository), but there are also many packages that differ from those in the AUR. 10 | 11 | ## Arch Linux CN Software Source Replacement 12 | 13 | :::caution 14 | **To avoid problems when replacing software source configuration files, please make a backup of the system's default software source configuration files before proceeding.** 15 | ::: 16 | 17 | 1. Edit the `/etc/pacman.conf` add the following line to the top of the file: 18 | 19 | ```bash varcode 20 | [archlinuxcn] 21 | Server = ${_http}://${_domain}/archlinuxcn/$arch 22 | ``` 23 | 24 | 2. Install the archlinuxcn-keyring: 25 | ```shell varcode 26 | [ ] (root) Are you the root user? 27 | --- 28 | const SUDO = !root ? 'sudo ' : ''; 29 | --- 30 | ${SUDO}pacman -S archlinuxcn-keyring 31 | ``` 32 | 33 | :::caution 34 | If you encounter the following error during the installation process: 35 | ```shell 36 | error: archlinuxcn-keyring: Signature from "Jiachen YANG (Arch Linux Packager Signing Key) " is marginal trust 37 | ``` 38 | This issue occurs because the developer has retired, which leaves the GPG key for farseerfc with a limited trust status in new installations. You can address this by executing the following command: 39 | ```shell varcode 40 | sudo pacman-key --lsign-key "farseerfc@archlinux.org" 41 | ``` 42 | ::: 43 | 44 | 3. Update the package cache: 45 | 46 | ```shell varcode 47 | [ ] (root) Are you the root user? 48 | --- 49 | const SUDO = !root ? 'sudo ' : ''; 50 | --- 51 | ${SUDO}pacman -Syyu 52 | ``` 53 | 54 | The `yy` in the command helps prevent issues when switching from **broken** mirrors to **healthy** mirrors. 55 | 56 | If you want to switch from a newer mirror to an older mirror, you can execute the following command to downgrade some packages and avoid partial updates to the system: 57 | 58 | 59 | ```shell varcode 60 | [ ] (root) Are you the root user? 61 | --- 62 | const SUDO = !root ? 'sudo ' : ''; 63 | --- 64 | ${SUDO}pacman -Syyuu 65 | ``` 66 | 67 | ## One-click source switching 68 | 69 | :::caution 70 | This method is only applicable for switching from the official source to our site's source. If you have already switched sources, please do not use the following commands. 71 | ::: 72 | 73 | Use the `echo` command to add the URL of the current mirror to the end of the configuration file: 74 | 75 | ```shell varcode 76 | [ ] (root) Are you the root user? 77 | --- 78 | const SUDO = !root ? 'sudo ' : ''; 79 | --- 80 | ${SUDO}echo -e "[archlinuxcn]\nServer = ${_http}://${_domain}/archlinuxcn/\$arch" >> /etc/pacman.conf 81 | ``` 82 | 83 | ## References 84 | 85 | 1. [ZMirror](https://mirrors.cernet.edu.cn/about) 86 | 2. [Help Repository](https://github.com/mirrorz-org/mirrorz-help) 87 | --------------------------------------------------------------------------------