Skip to content

Commit

Permalink
lug: move openwrt to internal and fix error rediction (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
truc0 authored Dec 1, 2024
1 parent 13dbf28 commit 94fca80
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 17 deletions.
24 changes: 16 additions & 8 deletions caddy/Caddyfile.siyuan
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ http://mirror.sjtu.edu.cn {
not path /opensuse/*
not path /remi/*
not path /ubuntu/*
not path /openwrt/*
not path /openeuler/*
not path /fedora/*
}
Expand Down Expand Up @@ -88,8 +87,13 @@ http://mirror.sjtu.edu.cn {
respond @hidden 404
}
redir /openwrt /openwrt/ 301
handle_path /openwrt/* {
redir * https://mirrors.cernet.edu.cn/openwrt{uri} 302
handle /openwrt/* {
file_server browse {
root /srv/nfs27T
hide .*
}
@hidden path */.*
respond @hidden 404
}
redir /rpmfusion /rpmfusion/ 301
handle /rpmfusion/* {
Expand Down Expand Up @@ -202,7 +206,6 @@ 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 @@ -354,8 +357,8 @@ https://mirror.sjtu.edu.cn {
reverse_proxy rsync-gateway:8000
}
redir /debian-cdimage /debian-cdimage/ 301
handle_path /debian-cdimage/* {
redir * https://ftp.sjtu.edu.cn/debian-cd{uri} 302
handle /debian-cdimage/* {
reverse_proxy rsync-gateway:8000
}
redir /packman /packman/ 301
handle /packman/* {
Expand Down Expand Up @@ -518,8 +521,13 @@ https://mirror.sjtu.edu.cn {
respond @hidden 404
}
redir /openwrt /openwrt/ 301
handle_path /openwrt/* {
redir * https://mirrors.cernet.edu.cn/openwrt{uri} 302
handle /openwrt/* {
file_server browse {
root /srv/nfs27T
hide .*
}
@hidden path */.*
respond @hidden 404
}
redir /rpmfusion /rpmfusion/ 301
handle /rpmfusion/* {
Expand Down
4 changes: 2 additions & 2 deletions caddy/Caddyfile.zhiyuan
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ https://mirrors.sjtug.sjtu.edu.cn {
}
redir /debian-cdimage /debian-cdimage/ 301
handle_path /debian-cdimage/* {
redir * https://ftp.sjtu.edu.cn/debian-cd{uri} 302
redir * https://mirror.sjtu.edu.cn/debian-cdimage{uri} 302
}
redir /packman /packman/ 301
handle_path /packman/* {
Expand Down Expand Up @@ -741,7 +741,7 @@ https://mirrors.sjtug.sjtu.edu.cn {
}
redir /openwrt /openwrt/ 301
handle_path /openwrt/* {
redir * https://mirrors.cernet.edu.cn/openwrt{uri} 302
redir * https://mirror.sjtu.edu.cn/openwrt{uri} 302
}
redir /rpmfusion /rpmfusion/ 301
handle_path /rpmfusion/* {
Expand Down
20 changes: 13 additions & 7 deletions config.siyuan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,14 @@ repos:
<<: *rsync_fetcher_common
<<: *oneshot_common
# debian-cdimage
- type: external
- type: shell_script
name: debian-cdimage
serve_mode: redir
target: https://ftp.sjtu.edu.cn/debian-cd
script: /worker-script/rsync-fetcher.sh
interval: 30401
source: rsync://cdimage.debian.org/cdimage/
serve_mode: rsync_gateway
rsync_extra_flags: --exclude=archive/ --exclude="daily-*/" --exclude=source/ --include=".latest" --exclude=".*/" --exclude="*alpha*" --exclude="*-edu-*" --exclude=/blends-live --exclude=/cd-sources --exclude=/release --exclude=/experimental-live --exclude="/snapshot*" --exclude="/stretch*" --exclude=/tmp --include=/unofficial/non-free --exclude="/unofficial/*" --exclude="/project*" --exclude=/cloud/test --exclude="/cloud/**/daily"
<<: *rsync_fetcher_common
<<: *oneshot_common
# packman
- type: shell_script
Expand Down Expand Up @@ -380,11 +384,13 @@ repos:
no_redir_http: true
<<: *oneshot_common
# openwrt
- type: external
- type: shell_script
script: /worker-script/rsync.sh
source: rsync://rsync.openwrt.org/downloads/
interval: 6900
path: /srv/nfs27T/openwrt
rsync_extra_flags: --exclude "index.html" --exclude "snapshots/*"
name: openwrt
serve_mode: redir
target: https://mirrors.cernet.edu.cn/openwrt
disabled: true
no_redir_http: true
<<: *oneshot_common
# rpmfusion
Expand Down
5 changes: 5 additions & 0 deletions rsync-gateway/config.siyuan.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ namespace = "endeavouros"
s3_bucket = "899a892efef34b1b944a19981040f55b-oss01"
s3_prefix = "rsync/endeavouros"

[endpoints.debian-cdimage]
namespace = "debian-cdimage"
s3_bucket = "899a892efef34b1b944a19981040f55b-oss01"
s3_prefix = "rsync/debian-cdimage"

[endpoints.packman]
namespace = "packman"
s3_bucket = "899a892efef34b1b944a19981040f55b-oss01"
Expand Down

0 comments on commit 94fca80

Please sign in to comment.