-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Please read https://github.com/mirrorz-org/org/tree/master/docs for latest version -- this wiki is no longer updated.
Welcome to MirrorZ wiki! In this wiki, the design of MirrorZ is explained.
MirrorZ consists of the following services:
- https://mirrorz.org/: frontend with dynamic, real-time content
- https://mirrorz.org/_/: frontend with static, not-so-real-time content
- oh-my-mirrorz: Speedtest script
- mirrorz-302: backend for redirecting user requests to their "optimal" mirror site
- mirrorz-search: backend for searching (experimental)
- mirrorz-monitor: used by the above two services, also for users to check the status of mirror sites
Note: Unless one mirror site gives their consent, MirrorZ would not include them in any of its services.
As there are multiple services, one mirror site can choose which services to participate in by selectively providing the following data and editing the config.
The format is defined at https://github.com/tuna/mirrorz#data-format-v15-draft. For each mirror site, they should provide this data for the frontends, oh-my-mirrorz and monitor to work.
One mirror site has two ways of providing mirrorz.json
Namely the mirror site exposes one single url for MirrorZ to use.
- To enable dynamic frontend, add the url in mirrorz-config/config/mirrorz.org.json:upstream_mirrors and enable CORS for mirrorz.org
- To enable static frontend and oh-my-mirrorz.py, add the url in mirrorz-config/config/mirrorz.org.json:mirrors
- To enable monitor, add the url in mirrorz-config/config/mirrorz.org.json:monitor_mirrors
A parser transforms their data (e.g. tunasync.json) to mirrorz.json.
Once a parser is provided in mirrorz-parser
,
- To enable dynamic frontend, add the parser in mirrorz-config/config/mirrorz.org.json:upstream_parser and enable CORS for mirrorz.org on the data the mirror site provides
- To enable static frontend and oh-my-mirrorz.py, add the parser in mirrorz-config/config/mirrorz.org.json:mirrors_legacy. MirrorZ would periodically generate a mirrorz.json.
- To enable monitor, add the parser in mirrorz-config/config/mirrorz.org.json:monitor_parser
This is an extension to mirrorz.json. It is defined at https://github.com/mirrorz-org/mirrorz-302#mirrorzdjson and hosted at https://github.com/mirrorz-org/mirrorz-d-extension.
This enables the user to use redirection provided by mirrorz. Namely when they are substituting sources, they can just use the domain name of mirrorz.
Currently there are two instances running this service: https://mirrors.cernet.edu.cn and https://mirrors.cngi.edu.cn
By providing this file, mirror site is aware of potential traffic being redirected to them.