https://pub.dartlang.org/api/packages/flutter/versions/latesthttps://your-worker.your-subdomain.workers.dev/pub.dartlang.org/api/packages/flutter/versions/latest
https://crates.io/api/v1/crates/serdehttps://your-worker.your-subdomain.workers.dev/crates.io/api/v1/crates/serde
在原始URL前添加此Workers域名,例如:
https://github.com/user/repo/archive/main.ziphttps://your-worker.your-subdomain.workers.dev/github.com/user/repo/archive/main.zip
https://raw.githubusercontent.com/user/repo/main/file.txthttps://your-worker.your-subdomain.workers.dev/raw.githubusercontent.com/user/repo/main/file.txt
https://maven.google.com/androidx/core/core/1.7.0/core-1.7.0.aarhttps://your-worker.your-subdomain.workers.dev/maven.google.com/androidx/core/core/1.7.0/core-1.7.0.aar
在VSCode设置中添加:
"http.proxy": "https://your-worker.your-subdomain.workers.dev"
在项目根目录的 gradle.properties 文件中添加:
systemProp.https.proxyHost=your-worker.your-subdomain.workers.dev
systemProp.https.proxyPort=443
systemProp.http.proxyHost=your-worker.your-subdomain.workers.dev
systemProp.http.proxyPort=443
设置环境变量:
# Windows (PowerShell)
$env:PUB_HOSTED_URL="https://your-worker.your-subdomain.workers.dev/pub.dartlang.org"
$env:FLUTTER_STORAGE_BASE_URL="https://your-worker.your-subdomain.workers.dev/storage.googleapis.com"
# macOS/Linux
export PUB_HOSTED_URL="https://your-worker.your-subdomain.workers.dev/pub.dartlang.org"
export FLUTTER_STORAGE_BASE_URL="https://your-worker.your-subdomain.workers.dev/storage.googleapis.com"
在 ~/.cargo/config.toml 中添加:
[source.crates-io]
registry = "https://your-worker.your-subdomain.workers.dev/index.crates.io"
replace-with = "mirror"
[source.mirror]
registry = "https://your-worker.your-subdomain.workers.dev/index.crates.io"
在Xcode项目中使用镜像URL:
https://your-worker.your-subdomain.workers.dev/github.com/realm/SwiftLint
服务正常运行中... 🟢
如有问题,请检查URL格式是否正确。
点击测试是否正常工作: