Skip to content

Commit

Permalink
lug: serve qt through rsync-sjtug-v4
Browse files Browse the repository at this point in the history
  • Loading branch information
PhotonQuantum committed Sep 12, 2023
1 parent 7418943 commit 86636d2
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 50 deletions.
11 changes: 5 additions & 6 deletions caddy/Caddyfile.siyuan
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ mirror.sjtu.edu.cn {
route /opencloudos/* {
reverse_proxy rsync-gateway-v4:8000
}
redir /qt /qt/ 301
route /qt/* {
reverse_proxy rsync-gateway:8000
}
redir /debian /debian/ 301
file_server /debian/* browse {
root /srv/data32T
Expand Down Expand Up @@ -989,11 +993,6 @@ mirror.sjtu.edu.cn {
uri strip_prefix /ctan
redir * https://mirrors.sjtug.sjtu.edu.cn/ctan{uri} 302
}
redir /qt /qt/ 301
route /qt/* {
uri strip_prefix /qt
redir * https://mirrors.sjtug.sjtu.edu.cn/qt{uri} 302
}

route /git/linuxbrew-core.git/* {
reverse_proxy git-backend
Expand Down Expand Up @@ -1084,6 +1083,7 @@ mirror.sjtu.edu.cn {
not path /packman/*
not path /raspberry-pi-os-images/*
not path /opencloudos/*
not path /qt/*
not path /debian-cd/*
not path /deepin-cd/*
not path /docker-ce/*
Expand Down Expand Up @@ -1188,7 +1188,6 @@ mirror.sjtu.edu.cn {
not path /CRAN/*
not path /CTAN/*
not path /ctan/*
not path /qt/*
}
encode @gzip_enabled gzip zstd
redir /speedtest /speedtest/ 308
Expand Down
36 changes: 6 additions & 30 deletions caddy/Caddyfile.zhiyuan
Original file line number Diff line number Diff line change
Expand Up @@ -141,31 +141,6 @@ http://mirrors.sjtug.sjtu.edu.cn/ctan/* {
header * x-sjtug-mirror-id zhiyuan
}

http://mirrors.sjtug.sjtu.edu.cn/qt {
redir /qt /qt/ 301
log {
output stdout
format single_field common_log # log in v1 style
}
}

http://mirrors.sjtug.sjtu.edu.cn/qt/* {
encode /* gzip zstd
file_server /* browse {
root /mnt
hide .*
}
@hidden {
path */.*
}
respond @hidden 404
log {
output stdout
format single_field common_log # log in v1 style
}
header * x-sjtug-mirror-id zhiyuan
}

http://mirrors.sjtug.sjtu.edu.cn/speedtest {
redir /speedtest /speedtest/ 308
log {
Expand Down Expand Up @@ -413,11 +388,6 @@ mirrors.sjtug.sjtu.edu.cn {
root /mnt
hide .*
}
redir /qt /qt/ 301
file_server /qt/* browse {
root /mnt
hide .*
}
redir /anthon /anthon/ 301
route /anthon/* {
uri strip_prefix /anthon
Expand Down Expand Up @@ -473,6 +443,11 @@ mirrors.sjtug.sjtu.edu.cn {
uri strip_prefix /opencloudos
redir * https://mirror.sjtu.edu.cn/opencloudos{uri} 302
}
redir /qt /qt/ 301
route /qt/* {
uri strip_prefix /qt
redir * https://mirror.sjtu.edu.cn/qt{uri} 302
}
redir /debian /debian/ 301
route /debian/* {
uri strip_prefix /debian
Expand Down Expand Up @@ -1001,6 +976,7 @@ mirrors.sjtug.sjtu.edu.cn {
not path /archlinuxarm/*
not path /archlinux-cn/*
not path /opencloudos/*
not path /qt/*
not path /debian/*
not path /debian-cd/*
not path /debian-security/*
Expand Down
20 changes: 10 additions & 10 deletions config.siyuan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,16 @@ repos:
serve_mode: rsync_gateway_v4
<<: *rsync_fetcher_v4_common
<<: *oneshot_common
# qt (s3)
# - type: shell_script
# script: /worker-script/rsync-fetcher.sh
# source: rsync://master.qt.io/qt-all
# interval: 6000
# rsync_extra_flags: --exclude "snapshots/*"
# name: qt
# serve_mode: rsync_gateway
# <<: *rsync_fetcher_common
# <<: *oneshot_common
# qt
- type: shell_script
script: /worker-script/rsync-fetcher.sh
source: rsync://master.qt.io/qt-all
interval: 6000
rsync_extra_flags: --exclude "snapshots/*"
name: qt
serve_mode: rsync_gateway
<<: *rsync_fetcher_common
<<: *oneshot_common
# debian
- type: shell_script
script: /worker-script/debian.sh
Expand Down
8 changes: 4 additions & 4 deletions config.zhiyuan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ repos:
source: master.qt.io::qt-all
interval: 6000
path: /mnt/qt
name: qt
name: qt_rsync
rsync_extra_flags: --exclude "snapshots/*"
no_redir_http: true
# serve_mode: ignore
# unified: disable
# hidden: true
serve_mode: ignore
unified: disable
hidden: true
5 changes: 5 additions & 0 deletions rsync-gateway/config.siyuan.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ redis = "redis://redis/"
redis_namespace = "raspberry-pi-os-images"
s3_website = "https://s3.jcloud.sjtu.edu.cn/899a892efef34b1b944a19981040f55b-oss01/rsync/raspberry-pi-os-images"

[endpoints.qt]
redis = "redis://redis/"
redis_namespace = "qt"
s3_website = "https://s3.jcloud.sjtu.edu.cn/899a892efef34b1b944a19981040f55b-oss01/rsync/qt"

[endpoints.debian-cd]
redis = "redis://redis/"
redis_namespace = "debian-cd"
Expand Down

0 comments on commit 86636d2

Please sign in to comment.