mediago-dev--mediago
a9e3ed6a22
Gopeed's last release is aging and its SChannel-linked Windows build chokes on modern CDN TLS handshakes (we hit SEC_I_MESSAGE_FRAGMENT on twimg.com). Replace it with aria2 — same short flags (-x/-s/-k carry over verbatim), stricter arg handling, and well-trodden cross-platform builds. Binaries are vendored in-tree at extra/aria2/<os>/<arch>/ rather than pulled from a single GitHub release, because aria2 static builds for Linux / macOS / Windows come from different upstream repos. To keep the deps pipeline unified: - `scripts/download-deps.ts` grows a "source": "local" branch that copies from `extra/<tool>/<os>/<arch>/` into `.deps/<os>-<arch>/` instead of fetching from GitHub. Resulting layout matches the rest of the tools, so binaryResolver.ts needs no changes. - `scripts/deps-versions.json`: `gopeed` entry removed, `aria2` entry added with source:"local" + path:"extra/aria2". - `apps/core/internal/core/types.go`: BinaryNames[TypeDirect] `"gopeed"` → `"aria2c"`. - `apps/core/internal/core/schema/loader.go`: direct schema's Args map to aria2's flags (-d / -o, plus --console-log-level=notice / --summary-interval=1 / --allow-overwrite=true / --auto-file-renaming=false for parseable output and predictable rerun behaviour). ConsoleReg regexes updated to aria2's summary line format (e.g. "DL:512KiB" for speed, "(83%)" for percent). `--check-certificate=false` tacked on as a workaround for the SChannel handshake issue on the bundled 1.19.0 Windows build — proper fix is upgrading the vendored binary to a build that links against OpenSSL (e.g. 1.37.0), comment calls that out. - `apps/core/.env`, `Dockerfile`, `apps/electron/scripts/build.ts`, `apps/core/README.md`: gopeed → aria2c / aria2 references. No DB migration: existing `type: "direct"` rows keep working, the underlying binary just swaps. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
33 行
1.3 KiB
Bash
33 行
1.3 KiB
Bash
# ============================================================
|
|
# MediaGo 环境变量配置
|
|
# ============================================================
|
|
#
|
|
# 注意:使用 Taskfile 运行时,二进制文件路径会自动配置!
|
|
# Taskfile 会根据当前操作系统和架构自动检测并设置以下变量:
|
|
# - MEDIAGO_M3U8_BIN
|
|
# - MEDIAGO_BILIBILI_BIN
|
|
# - MEDIAGO_DIRECT_BIN
|
|
#
|
|
# 二进制文件应放置在 .bin/<platform>/<arch>/ 目录下:
|
|
# - Windows x64: .bin/win32/x64/
|
|
# - Windows ARM64: .bin/win32/arm64/
|
|
# - macOS x64: .bin/darwin/x64/
|
|
# - macOS ARM64: .bin/darwin/arm64/
|
|
# - Linux x64: .bin/linux/x64/
|
|
# - Linux ARM64: .bin/linux/arm64/
|
|
#
|
|
# 运行 'task dev:env' 查看当前配置
|
|
# ============================================================
|
|
|
|
# 下载器二进制文件路径配置
|
|
# 注意:如果通过 Taskfile 运行(task dev / task run),以下配置会被自动覆盖
|
|
# 只有直接运行 Go 程序时才需要手动设置这些路径
|
|
# MEDIAGO_M3U8_BIN=.bin/win32/x64/N_m3u8DL-RE.exe
|
|
# MEDIAGO_BILIBILI_BIN=.bin/win32/x64/BBDown.exe
|
|
# MEDIAGO_DIRECT_BIN=.bin/win32/x64/aria2c.exe
|
|
|
|
# 日志配置
|
|
# 日志级别: debug, info, warn, error (默认: info)
|
|
MEDIAGO_LOG_LEVEL=info
|
|
# 日志文件存储目录 (默认: ./logs)
|
|
MEDIAGO_LOG_DIR=./logs |