67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
upstream:
|
|
- server: https://mirrors.aliyun.com
|
|
match:
|
|
match: /(debian|ubuntu|ubuntu-releases|alpine|archlinux|kali|manjaro|msys2|almalinux|rocky|centos|centos-stream|centos-vault|fedora|epel)(.*)
|
|
replace: '/$1$2'
|
|
- server: http://mirrors.tencent.com
|
|
match:
|
|
match: /(debian|ubuntu|ubuntu-releases|alpine|archlinux|kali|manjaro|msys2|almalinux|rocky|centos|centos-stream|centos-vault|fedora|epel)(.*)
|
|
replace: '/$1$2'
|
|
- server: http://mirrors.ustc.edu.cn
|
|
match:
|
|
match: /(debian|ubuntu|ubuntu-releases|alpine|archlinux|kali|manjaro|msys2|almalinux|rocky|centos|centos-stream|centos-vault|fedora|epel|elrepo|remi|rpmfusion|tailscale)(.*)
|
|
replace: '/$1$2'
|
|
- server: https://packages.microsoft.com/repos/code
|
|
match:
|
|
match: /microsoft-code(.*)
|
|
replace: '$1'
|
|
- server: http://releases.ubuntu.com/
|
|
match:
|
|
match: /ubuntu-releases/(.*)
|
|
replace: /$1
|
|
- server: https://apt.releases.hashicorp.com
|
|
match:
|
|
match: /hashicorp-deb/(.*)
|
|
replace: /$1
|
|
- server: https://dl.google.com/linux/chrome
|
|
match:
|
|
match: /google-chrome/(.*)
|
|
replace: /$1
|
|
- server: https://pkgs.tailscale.com/stable
|
|
match:
|
|
match: /tailscale/(.*)
|
|
replace: /$1
|
|
- server: http://update.cs2c.com.cn:8080
|
|
match:
|
|
match: /kylinlinux/(.*)
|
|
replace: /$1
|
|
|
|
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
|
|
# chunk-bytes: 1048576 # 1024*1024
|
|
|
|
cache:
|
|
timeout: 1h
|
|
policies:
|
|
- match: '.*\.(rpm|deb)$'
|
|
refresh-after: never
|
|
|
|
storage:
|
|
type: local # ignored
|
|
local:
|
|
path: /data # defaults to ./data
|
|
|
|
accel:
|
|
# example nginx config:
|
|
## location /i {
|
|
## internal;
|
|
## alias /path/to/data;
|
|
## }
|
|
## location / {
|
|
## proxy_pass 127.0.0.1:8881;
|
|
## proxy_set_header X-Accel-Path /i;
|
|
## }
|
|
##
|
|
|
|
# enable-by-header: "X-Accel-Path"
|