From f61a0994aa87ccc1b2fc08f358eaf57a659a213d Mon Sep 17 00:00:00 2001 From: will-jerry <117060969+will-jerry@users.noreply.github.com> Date: Wed, 3 Jul 2024 17:38:45 +0800 Subject: [PATCH 1/4] Update index.js --- src/index.js | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) 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) { From c8f5bf848588c014d8eb821df916d3d5f68508db Mon Sep 17 00:00:00 2001 From: will-jerry <117060969+will-jerry@users.noreply.github.com> Date: Wed, 3 Jul 2024 17:42:05 +0800 Subject: [PATCH 2/4] Update wrangler.toml --- wrangler.toml | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/wrangler.toml b/wrangler.toml index 17f18f5fb..305076589 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 = "quey.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" From 2d4de2a8c81c6da7665360a4cd740d605226c024 Mon Sep 17 00:00:00 2001 From: will-jerry <117060969+will-jerry@users.noreply.github.com> Date: Wed, 3 Jul 2024 17:47:14 +0800 Subject: [PATCH 3/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From b81b873eeeabf415bb9f8ff1f449ba7f41d8b844 Mon Sep 17 00:00:00 2001 From: will-jerry <117060969+will-jerry@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:54:54 +0800 Subject: [PATCH 4/4] Update wrangler.toml --- wrangler.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrangler.toml b/wrangler.toml index 305076589..4dc9fd909 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -34,7 +34,7 @@ TARGET_UPSTREAM = "https://registry-1.docker.io" name = "cloudflare-docker-proxy" routes = [ { pattern = "docker.hostscc.top", custom_domain = true }, - { pattern = "quey.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 },