update default config
This commit is contained in:
parent
593cb02d3f
commit
89da9e0bcb
@ -1,11 +1,11 @@
|
||||
FROM golang:1.23-alpine
|
||||
FROM docker.io/library/golang:1.23-alpine
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
ADD . /src
|
||||
RUN go build -o /cache-proxy ./cmd/proxy
|
||||
|
||||
FROM alpine:3.21 as runtime
|
||||
FROM docker.io/library/alpine:3.21 as runtime
|
||||
COPY --from=0 /cache-proxy /bin/cache-proxy
|
||||
WORKDIR /etc/
|
||||
VOLUME /data
|
||||
|
38
config.yaml
38
config.yaml
@ -15,6 +15,10 @@ upstream:
|
||||
match:
|
||||
match: /microsoft-code(.*)
|
||||
replace: '$1'
|
||||
- server: https://archive.ubuntu.com
|
||||
match:
|
||||
match: /ubuntu/(.*)
|
||||
replace: /$1
|
||||
- server: http://releases.ubuntu.com/
|
||||
match:
|
||||
match: /ubuntu-releases/(.*)
|
||||
@ -23,6 +27,10 @@ upstream:
|
||||
match:
|
||||
match: /hashicorp-deb/(.*)
|
||||
replace: /$1
|
||||
- server: https://rpm.releases.hashicorp.com
|
||||
match:
|
||||
match: /hashicorp-rpm/(.*)
|
||||
replace: /$1
|
||||
- server: https://dl.google.com/linux/chrome
|
||||
match:
|
||||
match: /google-chrome/(.*)
|
||||
@ -35,6 +43,34 @@ upstream:
|
||||
match:
|
||||
match: /kylinlinux/(.*)
|
||||
replace: /$1
|
||||
- server: http://cdn.jsdelivr.net
|
||||
match:
|
||||
match: /jsdelivr/(.*)
|
||||
replace: /$1
|
||||
- server: https://dl-cdn.alpinelinux.org
|
||||
match:
|
||||
match: /alpine/(.*)
|
||||
replace: /$1
|
||||
- server: https://deb.debian.org/debian
|
||||
match:
|
||||
match: /debian/(.*)
|
||||
replace: /$1
|
||||
- server: https://repo.almalinux.org
|
||||
match:
|
||||
match: /almalinux/(.*)
|
||||
replace: /almalinux/$1
|
||||
- server: https://dl.rockylinux.org/pub/rocky
|
||||
match:
|
||||
match: /rocky/(.*)
|
||||
replace: /$1
|
||||
- server: https://dl.fedoraproject.org/pub/epel
|
||||
match:
|
||||
match: /epel/(.*)
|
||||
replace: /$1
|
||||
- server: http://deb.debian.org
|
||||
match:
|
||||
match: /(debian|debian-security)/(.*)
|
||||
replace: /$1/$2
|
||||
|
||||
misc:
|
||||
first-chunk-bytes: 31457280 # 1024*1024*30, all upstreams with 200 response will wait for the first chunks to select a upstream by bandwidth, instead of by latency. defaults to 50M
|
||||
@ -45,6 +81,8 @@ cache:
|
||||
policies:
|
||||
- match: '.*\.(rpm|deb)$'
|
||||
refresh-after: never
|
||||
- match: '^/.*-security/.*'
|
||||
refresh-after: 1h
|
||||
|
||||
storage:
|
||||
type: local # ignored
|
||||
|
Loading…
x
Reference in New Issue
Block a user