diff --git a/caddy/Caddyfile.siyuan b/caddy/Caddyfile.siyuan index ed3c598..dd6cd40 100644 --- a/caddy/Caddyfile.siyuan +++ b/caddy/Caddyfile.siyuan @@ -529,6 +529,15 @@ https://mirror.sjtu.edu.cn { @hidden path */.* respond @hidden 404 } + redir /ubuntu-releases /ubuntu-releases/ 301 + handle /ubuntu-releases/* { + file_server browse { + root /srv/data32T + hide .* + } + @hidden path */.* + respond @hidden 404 + } redir /ubuntu-cdimage /ubuntu-cdimage/ 301 handle /ubuntu-cdimage/* { file_server browse { diff --git a/caddy/Caddyfile.zhiyuan b/caddy/Caddyfile.zhiyuan index e5671d5..c25cd20 100644 --- a/caddy/Caddyfile.zhiyuan +++ b/caddy/Caddyfile.zhiyuan @@ -213,6 +213,7 @@ https://mirrors.sjtug.sjtu.edu.cn { not path /remi/* not path /termux/* not path /ubuntu/* + not path /ubuntu-releases/* not path /ubuntu-cdimage/* not path /ubuntu-ports/* not path /openwrt/* @@ -716,6 +717,10 @@ https://mirrors.sjtug.sjtu.edu.cn { handle_path /ubuntu/* { redir * https://mirror.sjtu.edu.cn/ubuntu{uri} 302 } + redir /ubuntu-releases /ubuntu-releases/ 301 + handle_path /ubuntu-releases/* { + redir * https://mirror.sjtu.edu.cn/ubuntu-releases{uri} 302 + } redir /ubuntu-cdimage /ubuntu-cdimage/ 301 handle_path /ubuntu-cdimage/* { redir * https://mirror.sjtu.edu.cn/ubuntu-cdimage{uri} 302 diff --git a/config.siyuan.yaml b/config.siyuan.yaml index 9aa633f..d26eae9 100644 --- a/config.siyuan.yaml +++ b/config.siyuan.yaml @@ -397,14 +397,14 @@ repos: name: ubuntu no_redir_http: true <<: *oneshot_common - # # ubuntu-cd - # - type: shell_script - # script: /worker-script/rsync.sh - # source: rsync://rsync.releases.ubuntu.com/releases/ - # interval: 24600 - # path: /srv/data32T/ubuntu-cd - # name: ubuntu-cd - # <<: *oneshot_common + # ubuntu-releases + - type: shell_script + script: /worker-script/rsync.sh + source: rsync://rsync.releases.ubuntu.com/releases/ + interval: 24600 + path: /srv/data32T/ubuntu-releases + name: ubuntu-releases + <<: *oneshot_common # ubuntu-cdimage - type: shell_script script: /worker-script/rsync.sh