A Cloudflare Workers Mirror That Flattens Linux and Docker Hub Sources
You've probably been there: you need to update a system or pull a Docker image, and the official source is crawling because of where you're connecting from. So you hop between Tsinghua, USTC, Aliyun, and a handful of other mirrors, only to find that some packages are outdated, or worse, you're not entirely sure what's been slipped into the third-party copy. AdySec's CF mirror is an attempt to sidestep that whole dance by running a mirror on Cloudflare Workers instead of a traditional server.
What It Does
At its core, this is a mirror site built on Cloudflare Workers that pulls from upstream sources and serves them back through Cloudflare's CDN. The README describes it as a "flattened" mirror ("拉平镜像站"), and the setup covers a wide range of Linux distributions and related repositories—Ubuntu, CentOS, EPEL, Deepin, Kali, Debian, Manjaro, GNU, OpenWrt, KaOS, and several Arch-adjacent repos like arch4edu, archlinux, bioarchlinux, archlinuxcn, and archlinuxarm. Each entry in the table maps a local path to a sync source, so the mirror acts as a transparent proxy rather than a full local copy.
The architecture is deliberately lightweight. It runs on the Cloudflare Workers Free Plan, which gives you 100,000 requests per day, no charge for duration, and 10 milliseconds of CPU time per invocation. The README notes that this is enough to handle 1,000+ regular users per day, with bandwidth described as at least 10 Tbps. There's also a note about Docker Hub: because of new rate-limiting policies that can cause permission denied errors or require login, the project moved to a Rust proxy program while still using the Cloudflare CDN.
Why It's Cool
-
It sidesteps the mirror-hopping problem. The README's framing is blunt about the pain: sometimes you need to switch between several sources just to finish updating a system, and third-party mirrors often lag behind official versions. By proxying through Cloudflare Workers, you get a single endpoint that's geographically close to you without maintaining a server yourself.
-
The free tier math is genuinely interesting. Cloudflare's free plan offering 100,000 requests per day and 10 Tbps of bandwidth is a lot for a personal or small-team mirror. The README's estimate of 1,000+ daily users on the free tier is a practical detail that matters if you're considering running your own instance.
-
It's honest about the tradeoffs. The README doesn't pretend third-party mirrors are perfect—it explicitly mentions that maintainers "might slip in private goods" (夹带私货), which is a refreshing acknowledgment of why some people prefer official sources even when they're slow.
-
The Rust proxy shift for Docker Hub is a real adaptation. Rather than ignoring Docker Hub's rate-limiting changes, the project changed its approach to a Rust proxy while keeping the Cloudflare CDN layer. That's a concrete example of a project responding to upstream policy changes instead of just breaking.
-
The scope is broad without being bloated. Covering everything from Ubuntu and Debian to OpenWrt and multiple Arch variants means you're not limited to one ecosystem. For anyone who works across distros, that's practical.
How to Try It
The README provides a live site at https://mirror.adysec.com/ and a project repo at https://github.com/adysec/mirror. The mirror itself is usable directly—each system has a configuration doc and a download address. For example:
- Ubuntu config:
https://mirror.adysec.com/system/ubuntu - Ubuntu downloads:
https://mirrors.adysec.com/system/ubuntu - Debian config:
https://mirror.adysec.com/system/debian - Arch Linux config:
https://mirror.adysec.com/system/archlinux
To use it, you'd replace your existing mirror URLs in your package manager config with the corresponding AdySec path. The README cautions that configuration docs may have errors and recommends referring to official documentation when modifying mirror sources.
If you want to test your connection speed to Cloudflare before committing, the README points to https://speed.cloudflare.com/ for self-service speed testing.
Since the repo is at https://github.com/adysec/mirror, you can browse the source, check the issue tracker, or fork it if you want to run your own instance on Cloudflare Workers.
Final Thoughts
This isn't a replacement for a full-fledged mirror infrastructure—it's a pragmatic proxy layer for people who want faster access without maintaining servers. The free-tier Cloudflare Workers approach keeps costs at zero and the Rust proxy for Docker Hub shows the project is actively adapting to upstream changes. If you're in a region where official sources are slow and you're tired of juggling multiple third-party mirrors, this is worth a look. Just keep in mind that the README itself warns about potential config errors, so verify against official docs before swapping your sources.
Follow @githubprojects for more developer tools and open source projects.