Skip to content

Commit 4a4b813

Browse files
authored
lug: temporary redir openwrt and openeuler to mirrorz (#495)
1 parent 766b228 commit 4a4b813

File tree

3 files changed

+33
-42
lines changed

3 files changed

+33
-42
lines changed

Diff for: caddy/Caddyfile.siyuan

+19-26
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ http://mirror.sjtu.edu.cn {
2727
not path /opensuse/*
2828
not path /remi/*
2929
not path /ubuntu/*
30+
not path /openwrt/*
31+
not path /openeuler/*
3032
not path /fedora/*
3133
}
3234
encode @gzip_enabled gzip zstd
@@ -58,7 +60,7 @@ http://mirror.sjtu.edu.cn {
5860
redir /fedora-secondary /fedora-secondary/ 301
5961
handle /fedora-secondary/* {
6062
file_server browse {
61-
root /srv/data32T
63+
root /srv/nfs27T
6264
hide .*
6365
}
6466
@hidden path */.*
@@ -79,20 +81,15 @@ http://mirror.sjtu.edu.cn {
7981
redir /ubuntu-ports /ubuntu-ports/ 301
8082
handle /ubuntu-ports/* {
8183
file_server browse {
82-
root /srv/data32T
84+
root /srv/nfs27T
8385
hide .*
8486
}
8587
@hidden path */.*
8688
respond @hidden 404
8789
}
8890
redir /openwrt /openwrt/ 301
89-
handle /openwrt/* {
90-
file_server browse {
91-
root /srv/data32T
92-
hide .*
93-
}
94-
@hidden path */.*
95-
respond @hidden 404
91+
handle_path /openwrt/* {
92+
redir * https://mirrors.cernet.edu.cn/openwrt{uri} 302
9693
}
9794
redir /rpmfusion /rpmfusion/ 301
9895
handle /rpmfusion/* {
@@ -103,6 +100,10 @@ http://mirror.sjtu.edu.cn {
103100
@hidden path */.*
104101
respond @hidden 404
105102
}
103+
redir /openeuler /openeuler/ 301
104+
handle_path /openeuler/* {
105+
redir * https://mirrors.cernet.edu.cn/openeuler{uri} 302
106+
}
106107
redir /fedora /fedora/ 301
107108
handle_path /fedora/* {
108109
redir * https://ftp.sjtu.edu.cn/fedora{uri} 302
@@ -201,6 +202,7 @@ https://mirror.sjtu.edu.cn {
201202
not path /remi/*
202203
not path /ubuntu/*
203204
not path /ubuntu-cdimage/*
205+
not path /openwrt/*
204206
not path /homebrew-bottles/*
205207
not path /rust-static/*
206208
not path /pypi-packages/*
@@ -239,6 +241,7 @@ https://mirror.sjtu.edu.cn {
239241
not path /git/dpdk.git/*
240242
not path /gradle/distributions/*
241243
not path /git/homebrew-install.git/*
244+
not path /openeuler/*
242245
not path /fedora/*
243246
not path /manjarostable/*
244247
not path /voidlinux/*
@@ -437,7 +440,7 @@ https://mirror.sjtu.edu.cn {
437440
redir /fedora-secondary /fedora-secondary/ 301
438441
handle /fedora-secondary/* {
439442
file_server browse {
440-
root /srv/data32T
443+
root /srv/nfs27T
441444
hide .*
442445
}
443446
@hidden path */.*
@@ -495,7 +498,7 @@ https://mirror.sjtu.edu.cn {
495498
redir /ubuntu-releases /ubuntu-releases/ 301
496499
handle /ubuntu-releases/* {
497500
file_server browse {
498-
root /srv/data32T
501+
root /srv/nfs27T
499502
hide .*
500503
}
501504
@hidden path */.*
@@ -508,20 +511,15 @@ https://mirror.sjtu.edu.cn {
508511
redir /ubuntu-ports /ubuntu-ports/ 301
509512
handle /ubuntu-ports/* {
510513
file_server browse {
511-
root /srv/data32T
514+
root /srv/nfs27T
512515
hide .*
513516
}
514517
@hidden path */.*
515518
respond @hidden 404
516519
}
517520
redir /openwrt /openwrt/ 301
518-
handle /openwrt/* {
519-
file_server browse {
520-
root /srv/data32T
521-
hide .*
522-
}
523-
@hidden path */.*
524-
respond @hidden 404
521+
handle_path /openwrt/* {
522+
redir * https://mirrors.cernet.edu.cn/openwrt{uri} 302
525523
}
526524
redir /rpmfusion /rpmfusion/ 301
527525
handle /rpmfusion/* {
@@ -694,13 +692,8 @@ https://mirror.sjtu.edu.cn {
694692
respond @hidden 404
695693
}
696694
redir /openeuler /openeuler/ 301
697-
handle /openeuler/* {
698-
file_server browse {
699-
root /srv/data32T
700-
hide .*
701-
}
702-
@hidden path */.*
703-
respond @hidden 404
695+
handle_path /openeuler/* {
696+
redir * https://mirrors.cernet.edu.cn/openeuler{uri} 302
704697
}
705698
redir /fedora /fedora/ 301
706699
handle_path /fedora/* {

Diff for: caddy/Caddyfile.zhiyuan

+2-2
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ https://mirrors.sjtug.sjtu.edu.cn {
741741
}
742742
redir /openwrt /openwrt/ 301
743743
handle_path /openwrt/* {
744-
redir * https://mirror.sjtu.edu.cn/openwrt{uri} 302
744+
redir * https://mirrors.cernet.edu.cn/openwrt{uri} 302
745745
}
746746
redir /rpmfusion /rpmfusion/ 301
747747
handle_path /rpmfusion/* {
@@ -885,7 +885,7 @@ https://mirrors.sjtug.sjtu.edu.cn {
885885
}
886886
redir /openeuler /openeuler/ 301
887887
handle_path /openeuler/* {
888-
redir * https://mirror.sjtu.edu.cn/openeuler{uri} 302
888+
redir * https://mirrors.cernet.edu.cn/openeuler{uri} 302
889889
}
890890
redir /fedora /fedora/ 301
891891
handle_path /fedora/* {

Diff for: config.siyuan.yaml

+12-14
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ repos:
250250
script: /worker-script/rsync.sh
251251
source: rsync://dl.fedoraproject.org/fedora-secondary/
252252
interval: 5000
253-
path: /srv/data32T/fedora-secondary
253+
path: /srv/nfs27T/fedora-secondary
254254
name: fedora-secondary
255255
rsync_extra_flags: --exclude "development/*" --exclude "extras/*" --exclude "*/debug/*"
256256
no_redir_http: true
@@ -361,7 +361,7 @@ repos:
361361
script: /worker-script/rsync.sh
362362
source: rsync://rsync.releases.ubuntu.com/releases/
363363
interval: 24600
364-
path: /srv/data32T/ubuntu-releases
364+
path: /srv/nfs27T/ubuntu-releases
365365
name: ubuntu-releases
366366
<<: *oneshot_common
367367
# ubuntu-cdimage
@@ -375,18 +375,16 @@ repos:
375375
script: /worker-script/ubuntu-debian-rsync.sh
376376
source: rsync://ports.ubuntu.com/ubuntu-ports/
377377
interval: 7800
378-
path: /srv/data32T/ubuntu-ports
378+
path: /srv/nfs27T/ubuntu-ports
379379
name: ubuntu-ports
380380
no_redir_http: true
381381
<<: *oneshot_common
382382
# openwrt
383-
- type: shell_script
384-
script: /worker-script/rsync.sh
385-
source: rsync://rsync.openwrt.org/downloads/
386-
interval: 6900
387-
path: /srv/data32T/openwrt
388-
rsync_extra_flags: --exclude "index.html" --exclude "snapshots/*"
383+
- type: external
389384
name: openwrt
385+
serve_mode: redir
386+
target: https://mirrors.cernet.edu.cn/openwrt
387+
disabled: true
390388
no_redir_http: true
391389
<<: *oneshot_common
392390
# rpmfusion
@@ -696,12 +694,12 @@ repos:
696694
serve_mode: git
697695
target: https://git.sjtu.edu.cn/sjtug/homebrew-install.git
698696
<<: *oneshot_common
699-
- type: shell_script
700-
script: /worker-script/rsync.sh
701-
source: rsync://repo.openeuler.openatom.cn/openeuler/
702-
interval: 5200
703-
path: /srv/data32T/openeuler
697+
- type: external
704698
name: openeuler
699+
serve_mode: redir
700+
target: https://mirrors.cernet.edu.cn/openeuler
701+
disabled: true
702+
no_redir_http: true
705703
<<: *oneshot_common
706704
- type: external
707705
name: fedora

0 commit comments

Comments
 (0)