feat(browser): migrate to CloakBrowser for browser emulation and streamline dependency management

- Replace Playwright-based browser emulation with CloakBrowser as default
- Update config to support CloakBrowser options and humanization presets
- Refactor browser helper to use CloakBrowser context and remove cf_clearance dependency
- Update Dockerfile, entrypoint, and update scripts to install CloakBrowser runtime
- Ensure CloakBrowser kernel is pre-installed during local setup and dependency updates
- Add tests for CloakBrowser integration and legacy compatibility
This commit is contained in:
jxxghp
2026-05-16 20:51:38 +08:00
parent 9069dccb2a
commit 0ee9fec1d2
10 changed files with 293 additions and 140 deletions

View File

@@ -80,6 +80,10 @@ function install_backend_and_download_resources() {
cp /tmp/requirements.txt.backup /app/requirements.txt
return 1
fi
INFO "正在更新 CloakBrowser 浏览器内核"
if ! ${VENV_PATH}/bin/python -m cloakbrowser install; then
WARN "CloakBrowser 浏览器内核更新失败,后续首次使用时可能重新下载"
fi
INFO "依赖更新成功"
else
INFO "依赖无变化,跳过依赖更新"