Skip to content

Commit

Permalink
lug: temporary redir openwrt and openeuler to mirrorz (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
truc0 authored Nov 28, 2024
1 parent 766b228 commit 4a4b813
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 42 deletions.
45 changes: 19 additions & 26 deletions caddy/Caddyfile.siyuan
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ http://mirror.sjtu.edu.cn {
not path /opensuse/*
not path /remi/*
not path /ubuntu/*
not path /openwrt/*
not path /openeuler/*
not path /fedora/*
}
encode @gzip_enabled gzip zstd
Expand Down Expand Up @@ -58,7 +60,7 @@ http://mirror.sjtu.edu.cn {
redir /fedora-secondary /fedora-secondary/ 301
handle /fedora-secondary/* {
file_server browse {
root /srv/data32T
root /srv/nfs27T
hide .*
}
@hidden path */.*
Expand All @@ -79,20 +81,15 @@ http://mirror.sjtu.edu.cn {
redir /ubuntu-ports /ubuntu-ports/ 301
handle /ubuntu-ports/* {
file_server browse {
root /srv/data32T
root /srv/nfs27T
hide .*
}
@hidden path */.*
respond @hidden 404
}
redir /openwrt /openwrt/ 301
handle /openwrt/* {
file_server browse {
root /srv/data32T
hide .*
}
@hidden path */.*
respond @hidden 404
handle_path /openwrt/* {
redir * https://mirrors.cernet.edu.cn/openwrt{uri} 302
}
redir /rpmfusion /rpmfusion/ 301
handle /rpmfusion/* {
Expand All @@ -103,6 +100,10 @@ http://mirror.sjtu.edu.cn {
@hidden path */.*
respond @hidden 404
}
redir /openeuler /openeuler/ 301
handle_path /openeuler/* {
redir * https://mirrors.cernet.edu.cn/openeuler{uri} 302
}
redir /fedora /fedora/ 301
handle_path /fedora/* {
redir * https://ftp.sjtu.edu.cn/fedora{uri} 302
Expand Down Expand Up @@ -201,6 +202,7 @@ https://mirror.sjtu.edu.cn {
not path /remi/*
not path /ubuntu/*
not path /ubuntu-cdimage/*
not path /openwrt/*
not path /homebrew-bottles/*
not path /rust-static/*
not path /pypi-packages/*
Expand Down Expand Up @@ -239,6 +241,7 @@ https://mirror.sjtu.edu.cn {
not path /git/dpdk.git/*
not path /gradle/distributions/*
not path /git/homebrew-install.git/*
not path /openeuler/*
not path /fedora/*
not path /manjarostable/*
not path /voidlinux/*
Expand Down Expand Up @@ -437,7 +440,7 @@ https://mirror.sjtu.edu.cn {
redir /fedora-secondary /fedora-secondary/ 301
handle /fedora-secondary/* {
file_server browse {
root /srv/data32T
root /srv/nfs27T
hide .*
}
@hidden path */.*
Expand Down Expand Up @@ -495,7 +498,7 @@ https://mirror.sjtu.edu.cn {
redir /ubuntu-releases /ubuntu-releases/ 301
handle /ubuntu-releases/* {
file_server browse {
root /srv/data32T
root /srv/nfs27T
hide .*
}
@hidden path */.*
Expand All @@ -508,20 +511,15 @@ https://mirror.sjtu.edu.cn {
redir /ubuntu-ports /ubuntu-ports/ 301
handle /ubuntu-ports/* {
file_server browse {
root /srv/data32T
root /srv/nfs27T
hide .*
}
@hidden path */.*
respond @hidden 404
}
redir /openwrt /openwrt/ 301
handle /openwrt/* {
file_server browse {
root /srv/data32T
hide .*
}
@hidden path */.*
respond @hidden 404
handle_path /openwrt/* {
redir * https://mirrors.cernet.edu.cn/openwrt{uri} 302
}
redir /rpmfusion /rpmfusion/ 301
handle /rpmfusion/* {
Expand Down Expand Up @@ -694,13 +692,8 @@ https://mirror.sjtu.edu.cn {
respond @hidden 404
}
redir /openeuler /openeuler/ 301
handle /openeuler/* {
file_server browse {
root /srv/data32T
hide .*
}
@hidden path */.*
respond @hidden 404
handle_path /openeuler/* {
redir * https://mirrors.cernet.edu.cn/openeuler{uri} 302
}
redir /fedora /fedora/ 301
handle_path /fedora/* {
Expand Down
4 changes: 2 additions & 2 deletions caddy/Caddyfile.zhiyuan
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ https://mirrors.sjtug.sjtu.edu.cn {
}
redir /openwrt /openwrt/ 301
handle_path /openwrt/* {
redir * https://mirror.sjtu.edu.cn/openwrt{uri} 302
redir * https://mirrors.cernet.edu.cn/openwrt{uri} 302
}
redir /rpmfusion /rpmfusion/ 301
handle_path /rpmfusion/* {
Expand Down Expand Up @@ -885,7 +885,7 @@ https://mirrors.sjtug.sjtu.edu.cn {
}
redir /openeuler /openeuler/ 301
handle_path /openeuler/* {
redir * https://mirror.sjtu.edu.cn/openeuler{uri} 302
redir * https://mirrors.cernet.edu.cn/openeuler{uri} 302
}
redir /fedora /fedora/ 301
handle_path /fedora/* {
Expand Down
26 changes: 12 additions & 14 deletions config.siyuan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ repos:
script: /worker-script/rsync.sh
source: rsync://dl.fedoraproject.org/fedora-secondary/
interval: 5000
path: /srv/data32T/fedora-secondary
path: /srv/nfs27T/fedora-secondary
name: fedora-secondary
rsync_extra_flags: --exclude "development/*" --exclude "extras/*" --exclude "*/debug/*"
no_redir_http: true
Expand Down Expand Up @@ -361,7 +361,7 @@ repos:
script: /worker-script/rsync.sh
source: rsync://rsync.releases.ubuntu.com/releases/
interval: 24600
path: /srv/data32T/ubuntu-releases
path: /srv/nfs27T/ubuntu-releases
name: ubuntu-releases
<<: *oneshot_common
# ubuntu-cdimage
Expand All @@ -375,18 +375,16 @@ repos:
script: /worker-script/ubuntu-debian-rsync.sh
source: rsync://ports.ubuntu.com/ubuntu-ports/
interval: 7800
path: /srv/data32T/ubuntu-ports
path: /srv/nfs27T/ubuntu-ports
name: ubuntu-ports
no_redir_http: true
<<: *oneshot_common
# openwrt
- type: shell_script
script: /worker-script/rsync.sh
source: rsync://rsync.openwrt.org/downloads/
interval: 6900
path: /srv/data32T/openwrt
rsync_extra_flags: --exclude "index.html" --exclude "snapshots/*"
- type: external
name: openwrt
serve_mode: redir
target: https://mirrors.cernet.edu.cn/openwrt
disabled: true
no_redir_http: true
<<: *oneshot_common
# rpmfusion
Expand Down Expand Up @@ -696,12 +694,12 @@ repos:
serve_mode: git
target: https://git.sjtu.edu.cn/sjtug/homebrew-install.git
<<: *oneshot_common
- type: shell_script
script: /worker-script/rsync.sh
source: rsync://repo.openeuler.openatom.cn/openeuler/
interval: 5200
path: /srv/data32T/openeuler
- type: external
name: openeuler
serve_mode: redir
target: https://mirrors.cernet.edu.cn/openeuler
disabled: true
no_redir_http: true
<<: *oneshot_common
- type: external
name: fedora
Expand Down

0 comments on commit 4a4b813

Please sign in to comment.