8b079d37e4c620bf6439ca630b0a04222a26926a
Keep/restore https://%@ in type0x01/core and rewrite daily module URLs to https, and move campaign assets from source/web/<hash>/ up to source/web/ so templates match the channel artifact layout. Co-authored-by: Cursor <cursoragent@cursor.com>
Coruna Lab Web
独立的渠道静态资源构建与分发服务,与 coruna-lab(Laravel C2 / Admin)同级部署。
coruna-lab-web/
├── frontend/
│ ├── source/ # 只读模板 / 明文输入(勿直接 --apply)
│ ├── tools/ # new_project / patch_*
│ ├── doc/ # Stage JS / sync / C2 链路文档
│ └── tests/ # native path patch 等工具测试
├── build_api/ # 同步 Build / Delete HTTP API(FastAPI)
├── docs/BUILD_API.md
├── tests/ # build_api 单元测试
└── artifacts/ # 本地默认产物根(gitignore)
└── channel/<id>/{web,sync,out,manifest.json}
兄弟项目:
ios-fetch/
├── coruna-lab/ # Laravel:渠道元数据、C2、Admin
└── coruna-lab-web/ # 本仓库:构建 + 静态产物站
Laravel 通过 CORUNA_BUILD_SERVICE_* 调用本服务的:
POST /v1/channels/{id}/buildDELETE /v1/channels/{id}
公开静态路径:
/channel/<id>/web/support.html
/channel/<id>/sync/daily.html
Setup
cd coruna-lab-web
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export BUILD_API_TOKEN="$(python3 -c 'import secrets; print(secrets.token_urlsafe(48))')"
export BUILD_API_ARTIFACT_ROOT="$PWD/artifacts"
python3 -m build_api
手动构建(不经 API):
python3 frontend/tools/new_project.py \
--channel-id 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' \
--deployment-domains 'www.dep.example' \
--reporting-domains 'www.rep.example' \
--support-template test # test | blank
Tests
python3 -m unittest discover -s tests -p 'test_*.py'
python3 -m unittest discover -s frontend/tests -p 'test_*.py'
python3 -m unittest discover -s frontend/tools/tests -p 'test_*.py'
Deploy
见 docs/BUILD_API.md。可用宝塔等面板托管进程与反向代理,仓库内不维护 Nginx / systemd 样例。
Description
Languages
HTML
93.3%
Python
6.7%