# 配置目录 本目录包含项目的所有配置文件。 ## 配置文件列表 - **config.json** - 主配置文件(唯一配置入口),包含所有运行时配置参数 - **pyrightconfig.json** - Pyright类型检查器配置 - **pytest.ini** - pytest测试框架配置 ## 注意事项 - `config/config.json` 是运行时配置文件,会被程序读取和修改 - 建议在修改配置前备份原文件 - 配置文件使用 UTF-8 编码 ## 自动更新配置 默认建议使用 HTTPS 且安装包与 manifest 同源: ```json { "auto_update": { "enabled": true, "manifest_url": "https://updates.example.com/douyin/update.json", "fail_closed": true, "require_sha256": true, "require_https": true, "allow_cross_origin": false } } ``` 仅内网临时测试 `http://192.168.x.x/...` 时,才显式放宽: ```json { "auto_update": { "enabled": true, "manifest_url": "http://192.168.10.2:8000/update.json", "require_https": false, "allow_cross_origin": true } } ``` 正式分发不要使用 HTTP;`sha256` 只能防安装包下载损坏,不能替代可信 manifest。 ## 在线卡密激活配置 正式接入服务器后,在本地配置中增加: ```json { "license": { "activation_url": "https://license.example.com/api/v1/activate", "timeout_seconds": 10 } } ``` 未配置 `activation_url` 时,客户端仍只按旧逻辑安装 `DYGJ-` 离线授权码或完整 `license.dat` 内容。配置后,普通 `DG-` 卡密会请求服务器激活,服务器返回的签名授权 仍会先在本地验签,通过后才写入 `license.dat`。