{
  "schema_version": 1,
  "version": "1.1.0",
  "origin": "https://mirgo.iurl.ai",
  "access": "anonymous-public-read-only",
  "routing": {
    "policy": "vps-first-cloudflare-fallback",
    "runtime_status": "/healthz",
    "fallback_metadata_limit_bytes": 262144,
    "midstream_failover": false
  },
  "limits": "统一入口仍经过 Cloudflare Workers Free：账号共享 100,000 动态请求/天，10 ms CPU/请求，128 MB 内存；北京时间每日 08:00 重置日请求额度。配置完成后优先通过美国 VPS 回源，VPS 故障时由 Cloudflare 回退。Cloudflare 回退时需要改写的元数据最多 256 KiB；此限制不适用于模型、镜像层等二进制文件。缓存仍消耗动态请求额度，缓存不是持久镜像。",
  "services": [
    {
      "id": "pypi",
      "name": "PyPI · pip / uv",
      "endpoint": "/pypi/simple/",
      "command": "pip install --index-url https://mirgo.iurl.ai/pypi/simple/ requests",
      "persistent": "pip config set global.index-url https://mirgo.iurl.ai/pypi/simple/",
      "undo": "pip config unset global.index-url",
      "note": "支持 HTML/JSON Simple API、wheel、sdist 和 .metadata；保留哈希和 Python 版本约束。使用 --index-url，不要用 extra-index-url 混合不可信源。uv：UV_INDEX_URL=https://mirgo.iurl.ai/pypi/simple/ uv sync"
    },
    {
      "id": "npm",
      "name": "npm · pnpm · Yarn",
      "endpoint": "/npm/",
      "command": "npm install --registry=https://mirgo.iurl.ai/npm/ --no-audit --fund=false lodash",
      "persistent": "npm config set registry https://mirgo.iurl.ai/npm/",
      "undo": "npm config delete registry",
      "note": "pnpm 使用同一 registry；Yarn Berry 设置 npmRegistryServer。支持 scoped 包。audit POST、发布、私有包不支持；安装脚本下载和 lockfile 固定的其他域名不会自动代理。需要时加 --ignore-scripts，但这可能影响包功能。"
    },
    {
      "id": "docker",
      "name": "Docker Hub",
      "endpoint": "/v2/",
      "command": "docker pull mirgo.iurl.ai/library/alpine:latest",
      "persistent": "# 合并到 /etc/docker/daemon.json，保留原有键；由用户自行 reload Docker\n{\"registry-mirrors\":[\"https://mirgo.iurl.ai\"]}",
      "undo": "从 daemon.json 的 registry-mirrors 移除 https://mirgo.iurl.ai，再自行 reload Docker。",
      "note": "显式地址最容易验证完整代理链路；官方镜像需要 library/ 前缀。仅支持 Docker Hub 公开镜像；匿名上游限流仍适用，daemon mirror 失败时可能尝试直连上游。无需 docker login。"
    },
    {
      "id": "hf",
      "name": "Hugging Face",
      "endpoint": "/hf/",
      "command": "HF_ENDPOINT=https://mirgo.iurl.ai/hf HF_HUB_DISABLE_XET=1 HF_HUB_DISABLE_IMPLICIT_TOKEN=1 hf download gpt2 config.json",
      "persistent": "export HF_ENDPOINT=https://mirgo.iurl.ai/hf\nexport HF_HUB_DISABLE_XET=1\nexport HF_HUB_DISABLE_IMPLICIT_TOKEN=1",
      "undo": "unset HF_ENDPOINT HF_HUB_DISABLE_XET HF_HUB_DISABLE_IMPLICIT_TOKEN",
      "note": "在导入 huggingface_hub/transformers 之前设置变量。只支持公开模型、数据集及文件；gated/private、推理、上传、Git LFS/Xet 原生客户端不支持。不要显式传入 HF token。大文件透传，不保证边缘缓存。"
    },
    {
      "id": "github",
      "name": "GitHub downloads",
      "endpoint": "/github/",
      "command": "curl -fL https://mirgo.iurl.ai/raw/psf/requests/main/README.md -o README.md",
      "persistent": "# 替换下载地址前缀\nhttps://github.com/OWNER/REPO/releases/download/TAG/FILE\n→ https://mirgo.iurl.ai/github/OWNER/REPO/releases/download/TAG/FILE\nhttps://github.com/OWNER/REPO/archive/refs/tags/TAG.tar.gz\n→ https://mirgo.iurl.ai/github/OWNER/REPO/archive/refs/tags/TAG.tar.gz\nhttps://raw.githubusercontent.com/OWNER/REPO/REF/PATH\n→ https://mirgo.iurl.ai/raw/OWNER/REPO/REF/PATH",
      "undo": "恢复原始 URL，无全局配置。",
      "note": "支持 releases/latest/download/FILE。只支持公开资源下载，不提供 Git clone、GitHub API、任意网页或任意 URL 转发。上游 HTML 内容在代理域名受到 CSP sandbox 限制。"
    },
    {
      "id": "go",
      "name": "Go Modules + sumdb",
      "endpoint": "/go/",
      "command": "GOPROXY=https://mirgo.iurl.ai/go GOSUMDB=sum.golang.org go mod download",
      "persistent": "go env -w GOPROXY=https://mirgo.iurl.ai/go\ngo env -w GOSUMDB=sum.golang.org",
      "undo": "go env -u GOPROXY\ngo env -u GOSUMDB",
      "note": "同时代理 sum.golang.org 校验数据，保留官方签名，禁止 GOSUMDB=off。私有模块依赖 GOPRIVATE 的直连行为不在覆盖范围；Go toolchain 自动下载不承诺兼容。"
    },
    {
      "id": "cargo",
      "name": "Rust · crates.io",
      "endpoint": "/cargo/index/",
      "command": "# 临时使用，无需改全局配置\ncargo --config 'source.crates-io.replace-with=\"mirgo\"' --config 'source.mirgo.registry=\"sparse+https://mirgo.iurl.ai/cargo/index/\"' fetch",
      "persistent": "# 项目 .cargo/config.toml，合并已有配置\n[source.crates-io]\nreplace-with = \"mirgo\"\n[source.mirgo]\nregistry = \"sparse+https://mirgo.iurl.ai/cargo/index/\"",
      "undo": "移除新增的 source replacement 配置，保留原配置。",
      "note": "支持 sparse index 和 crate 文件，保留原 checksum。仅设置 CARGO_REGISTRIES_CRATES_IO_INDEX 不能完整替代 source replacement。Git 依赖和 rustup 工具链不支持。"
    }
  ]
}