目录

「Download」我的种子,从来不缺种子

深夜的带宽只为远方的小姐姐——全栈下载器的运维记录。

种子下载

qBittorrent

基于 Docker 部署

注意:Docker 的子网更新后,为避免网页端经 Authelia 认证后还需二次登录,需要同步更新子网网段白名单,或直接设置为 Docker 的 B 类子网 172.16.0.0/12

services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:5.2.3-libtorrentv1
    container_name: qbittorrent
    stop_grace_period: "35s"
    restart: unless-stopped
    networks:
      - traefik_proxy
    ports:
      # - 19085:8080  # only for debug, must access by traefik
      - 36881:36881
      - 36881:36881/udp
    volumes:
      - /path/to/your/qb:/config
      - /path/to/your/QDL:/downloads
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Shanghai
      - WEBUI_PORT=8080
      - TORRENTING_PORT=36881
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=traefik_proxy"
      - "traefik.http.routers.qb.rule=Host(`bt.aio.yirami.xyz`)"
      - "traefik.http.routers.qb.entrypoints=websecure"
      - "traefik.http.routers.qb.tls=true"
      - "traefik.http.routers.qb.tls.certresolver=le"
      - "traefik.http.routers.qb.middlewares=authelia-auth"
      - "traefik.http.services.qb.loadbalancer.server.port=8080"
    deploy:
      resources:
        limits:
          cpus: '1'
          memory: 2G
    healthcheck:
      test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080 || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 60s

多协议下载

Aria2 + AriaNg

基于 Docker 部署

配置参考博客

services:
  aria2:
    container_name: aria2
    image: p3terx/aria2-pro
    restart: unless-stopped
    ports:
      # - 6800:6800  # only for debug, must access by traefik
      - 36888:6888
      - 36888:6888/udp
    environment:
      - PUID=1000
      - PGID=1000
      - UMASK_SET=022
      - RPC_SECRET=${ARIA2_RPC_SECRET}
      - RPC_PORT=6800
      - LISTEN_PORT=6888
      - DISK_CACHE=64M
      - IPV6_MODE=false
      - UPDATE_TRACKERS=true
      - CUSTOM_TRACKER_URL=
      - TZ=Asia/Shanghai
    volumes:
      - /path/to/your/aria2/config:/config
      - /path/to/your/aria2/downloads:/downloads
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=traefik_proxy"
      - "traefik.http.routers.aria2.rule=Host(`aria2.aio.yirami.xyz`)"
      - "traefik.http.routers.aria2.entrypoints=websecure"
      - "traefik.http.routers.aria2.tls=true"
      - "traefik.http.routers.aria2.tls.certresolver=le"
      - "traefik.http.services.aria2.loadbalancer.server.port=6800"
    deploy:
      resources:
        limits:
          cpus: '0.5'
          memory: 128M
    healthcheck:
      disable: true
    logging:
      options:
        max-size: "1m"

  ariang:
    container_name: ariang
    image: p3terx/ariang
    restart: unless-stopped
    ports:
      - 36880:6880
    depends_on:
      - aria2
    deploy:
      resources:
        limits:
          cpus: '0.5'
          memory: 8M
    healthcheck:
      disable: true
    logging:
      driver: json-file
      options:
        max-size: 1m