generate config for SHUOSC mirror site.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
test/app/controller
.autod.conf.js
.eslintignore
.eslintrc
.gitignore
.travis.yml
Dockerfile
LICENSE
README.md
appveyor.yml
docker-compose.yml
entrypoint.sh
package.json

README.md

Mirror Config Generator

Mirror config file generator for SHUOSC mirror site.

 ███████╗██╗  ██╗██╗   ██╗ ██████╗ ███████╗ ██████╗
 ██╔════╝██║  ██║██║   ██║██╔═══██╗██╔════╝██╔════╝
 ███████╗███████║██║   ██║██║   ██║███████╗██║     
 ╚════██║██╔══██║██║   ██║██║   ██║╚════██║██║     
 ███████║██║  ██║╚██████╔╝╚██████╔╝███████║╚██████╗
 ╚══════╝╚═╝  ╚═╝ ╚═════╝  ╚═════╝ ╚══════╝ ╚═════╝
 ███╗   ███╗ ██╗ ██████╗  ██████╗  ██████╗ ██████╗ 
 ████╗ ████║ ██║ ██╔══██╗ ██╔══██╗██╔═══██╗██╔══██╗
 ██╔████╔██║ ██║ ██████╔╝ ██████╔╝██║   ██║██████╔╝
 ██║╚██╔╝██║ ██║ ██╔══██╗ ██╔══██╗██║   ██║██╔══██╗
 ██║ ╚═╝ ██║ ██║ ██║  ██║ ██║  ██║╚██████╔╝██║  ██║
 ╚═╝     ╚═╝ ╚═╝ ╚═╝  ╚═╝ ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═╝ 

Development

$ yarn
$ yarn dev
$ curl http://localhost:7001/

Deploy

$ yarn start
$ yarn stop

Usage

# Help
$ curl "http://mirrors.shu.edu.cn/repos"
# Ubuntu
$ cp /etc/apt/sources.list /etc/apt/sources.list.backup
$ curl "http://mirrors.shu.edu.cn/repos/ubuntu?ip={ip}&version={version}" | sudo tee /etc/apt/source.list
$ sudo apt-get update
# CentOS
$ cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
$ curl "http://mirrors.shu.edu.cn/repos/centos?ip={ip}&version={version}" | sudo tee /etc/yum.repos.d/CentOS-Base.repo
$ sudo yum clean all
$ sudo yum makecache
# Debian
$ cp /etc/apt/sources.list /etc/apt/sources.list.backup
$ curl "http://mirrors.shu.edu.cn/repos/debian?ip={ip}&version={version}" | sudo tee /etc/apt/sources.list
$ sudo apt-get update
# Arch Linux
$ curl "http://mirrors.shu.edu.cn/repos/archlinux?ip={ip}" | sudo tee /etc/pacman.d/mirrorlist
$ pacman -Syyu