diff --git a/README.md b/README.md index 06b4adced..689e54e26 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![deploy](https://github.com/ciiiii/cloudflare-docker-proxy/actions/workflows/deploy.yaml/badge.svg) -[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/ciiiii/cloudflare-docker-proxy) +[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/will-jerry/cloudflare-docker-proxy) > If you're looking for proxy for helm, maybe you can try [cloudflare-helm-proxy](https://github.com/ciiiii/cloudflare-helm-proxy). @@ -12,7 +12,7 @@ 2. modify the link of the above button to your fork url 3. click the button, you will be redirected to the deploy page -[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/ciiiii/cloudflare-docker-proxy) +[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/will-jerry/cloudflare-docker-proxy) ## Config tutorial diff --git a/src/index.js b/src/index.js index e61d67dce..62da53277 100644 --- a/src/index.js +++ b/src/index.js @@ -5,18 +5,28 @@ addEventListener("fetch", (event) => { const dockerHub = "https://registry-1.docker.io"; -const routes = { - // production - "docker.libcuda.so": dockerHub, - "quay.libcuda.so": "https://quay.io", - "gcr.libcuda.so": "https://gcr.io", - "k8s-gcr.libcuda.so": "https://k8s.gcr.io", - "k8s.libcuda.so": "https://registry.k8s.io", - "ghcr.libcuda.so": "https://ghcr.io", - "cloudsmith.libcuda.so": "https://docker.cloudsmith.io", +// const routes = { +// // production +// "docker.libcuda.so": dockerHub, +// "quay.libcuda.so": "https://quay.io", +// "gcr.libcuda.so": "https://gcr.io", +// "k8s-gcr.libcuda.so": "https://k8s.gcr.io", +// "k8s.libcuda.so": "https://registry.k8s.io", +// "ghcr.libcuda.so": "https://ghcr.io", +// "cloudsmith.libcuda.so": "https://docker.cloudsmith.io", + +// // staging +// "docker-staging.libcuda.so": dockerHub, +// }; - // staging - "docker-staging.libcuda.so": dockerHub, +const routes = { + "docker.hostscc.top": "https://registry-1.docker.io", + "quay.hostscc.top": "https://quay.io", + "gcr.hostscc.top": "https://gcr.io", + "k8s-gcr.hostscc.top": "https://k8s.gcr.io", + "k8s.hostscc.top": "https://registry.k8s.io", + "ghcr.hostscc.top": "https://ghcr.io", + "cloudsmith.hostscc.top": "https://docker.cloudsmith.io", }; function routeByHosts(host) { diff --git a/wrangler.toml b/wrangler.toml index 17f18f5fb..4dc9fd909 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -10,16 +10,36 @@ local_protocol = "http" MODE = "debug" TARGET_UPSTREAM = "https://registry-1.docker.io" +# [env.production] +# name = "cloudflare-docker-proxy" +# routes = [ +# { pattern = "docker.libcuda.so", custom_domain = true }, +# { pattern = "quey.libcuda.so", custom_domain = true }, +# { pattern = "gcr.libcuda.so", custom_domain = true }, +# { pattern = "k8s-gcr.libcuda.so", custom_domain = true }, +# { pattern = "k8s.libcuda.so", custom_domain = true }, +# { pattern = "ghcr.libcuda.so", custom_domain = true }, +# { pattern = "cloudsmith.libcuda.so", custom_domain = true }, +# ] + +# [env.production.vars] +# MODE = "production" +# TARGET_UPSTREAM = "" + +# [env.staging] +# name = "cloudflare-docker-proxy-staging" +# route = { pattern = "docker-staging.libcuda.so", custom_domain = true } + [env.production] name = "cloudflare-docker-proxy" routes = [ - { pattern = "docker.libcuda.so", custom_domain = true }, - { pattern = "quey.libcuda.so", custom_domain = true }, - { pattern = "gcr.libcuda.so", custom_domain = true }, - { pattern = "k8s-gcr.libcuda.so", custom_domain = true }, - { pattern = "k8s.libcuda.so", custom_domain = true }, - { pattern = "ghcr.libcuda.so", custom_domain = true }, - { pattern = "cloudsmith.libcuda.so", custom_domain = true }, + { pattern = "docker.hostscc.top", custom_domain = true }, + { pattern = "quay.hostscc.top", custom_domain = true }, + { pattern = "gcr.hostscc.top", custom_domain = true }, + { pattern = "k8s-gcr.hostscc.top", custom_domain = true }, + { pattern = "k8s.hostscc.top", custom_domain = true }, + { pattern = "ghcr.hostscc.top", custom_domain = true }, + { pattern = "cloudsmith.hostscc.top", custom_domain = true }, ] [env.production.vars] @@ -28,7 +48,8 @@ TARGET_UPSTREAM = "" [env.staging] name = "cloudflare-docker-proxy-staging" -route = { pattern = "docker-staging.libcuda.so", custom_domain = true } +route = { pattern = "docker-staging.hostscc.top", custom_domain = true } + [env.staging.vars] MODE = "staging"