diff --git a/caddy/Caddyfile.siyuan b/caddy/Caddyfile.siyuan index ecc018c..80c4f50 100644 --- a/caddy/Caddyfile.siyuan +++ b/caddy/Caddyfile.siyuan @@ -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 @@ -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 @@ -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/* @@ -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 diff --git a/caddy/Caddyfile.zhiyuan b/caddy/Caddyfile.zhiyuan index 37ee56c..f00457d 100644 --- a/caddy/Caddyfile.zhiyuan +++ b/caddy/Caddyfile.zhiyuan @@ -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 { @@ -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 @@ -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 @@ -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/* diff --git a/config.siyuan.yaml b/config.siyuan.yaml index 600b497..d151001 100644 --- a/config.siyuan.yaml +++ b/config.siyuan.yaml @@ -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 diff --git a/config.zhiyuan.yaml b/config.zhiyuan.yaml index 85fedc1..b9abc87 100644 --- a/config.zhiyuan.yaml +++ b/config.zhiyuan.yaml @@ -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 diff --git a/rsync-gateway/config.siyuan.toml b/rsync-gateway/config.siyuan.toml index 285cb09..a7f770e 100644 --- a/rsync-gateway/config.siyuan.toml +++ b/rsync-gateway/config.siyuan.toml @@ -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"