Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull1 #81

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@
- add `A` record of xxx.example.com to `192.0.2.1`
- deploy this project to cloudflare workers
- add `xxx.example.com/*` to HTTP routes of workers
- add more records and modify the config as you need
- add more records and modify the config(src/index.js) as you need
```javascript
const routes = {
"docker.libcuda.so": "https://registry-1.docker.io",
"quay.libcuda.so": "https://quay.io",
"gcr.libcuda.so": "https://k8s.gcr.io",
"k8s-gcr.libcuda.so": "https://k8s.gcr.io",
"ghcr.libcuda.so": "https://ghcr.io",
"docker.liebe.pub": dockerHub,
"quay.liebe.pub": "https://quay.io",
"gcr.liebe.pub": "https://gcr.io",
"k8s-gcr.liebe.pub": "https://k8s.gcr.io",
"k8s.liebe.pub": "https://registry.k8s.io",
"ghcr.liebe.pub": "https://ghcr.io",
"cloudsmith.liebe.pub": "https://docker.cloudsmith.io",
"ecr.liebe.pub": "https://public.ecr.aws",
"docker-staging.liebe.pub": dockerHub,
};
```

18 changes: 9 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ 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",
"ecr.libcuda.so": "https://public.ecr.aws",
"docker.liebe.pub": dockerHub,
"quay.liebe.pub": "https://quay.io",
"gcr.liebe.pub": "https://gcr.io",
"k8s-gcr.liebe.pub": "https://k8s.gcr.io",
"k8s.liebe.pub": "https://registry.k8s.io",
"ghcr.liebe.pub": "https://ghcr.io",
"cloudsmith.liebe.pub": "https://docker.cloudsmith.io",
"ecr.liebe.pub": "https://public.ecr.aws",

// staging
"docker-staging.libcuda.so": dockerHub,
"docker-staging.liebe.pub": dockerHub,
};

function routeByHosts(host) {
Expand Down