配置项Configuration
config.yaml 里你会用到的字段。The fields in config.yaml you will actually touch.
配置文件位于 App 私有目录,首次启动时由内置模板写出;设置页可直接编辑。保存后需要重启内核才会生效。
下面只列你日常会改的字段。完整模板(含每个字段的上游注释)见仓库的 assets/config_template.yaml,App 内置模板与它一致。
订阅与拉取
| 字段 | 默认 | 说明 |
|---|---|---|
sub-urls | 内置若干 | 订阅链接列表。README 提到默认源里有几条已失效,可自行删改 |
sub-urls-retry | 3 | 单个订阅拉取失败后的重试次数 |
sub-urls-concurrent | 20 | 同时拉取的订阅数 |
sub-urls-get-ua | clash.meta (…) | 拉订阅时使用的 UA;设为 random 则随机 |
proxy | 空 | 拉取与推送走的 HTTP/SOCKS5 代理,如 http://user:pass@192.168.1.1:7890 |
github-proxy | 空 | GitHub 加速前缀,结尾要带 / |
修改订阅源的写法:
sub-urls:
- https://example.com/api/v1/client/subscribe?token=xxxx
- https://another.example.com/sub?token=yyyy
检测流程
| 字段 | 默认 | 说明 |
|---|---|---|
concurrent | 50 | 测活阶段并发数 |
media-concurrent | 20 | 流媒体检测并发数 |
speed-concurrent | 20 | 测速并发数;过高会互相抢带宽导致结果失真 |
timeout | 5000 | 单节点最大延迟(毫秒) |
alive-test-url | http://gstatic.com/generate_204 | 延迟测试地址 |
shuffle-test-order | true | 打乱测试顺序,避免相邻节点互相干扰 |
success-limit | 0 | 保留的成功节点上限,0 为不限 |
check-interval | 120 | 自动检测间隔(分钟) |
cron-expression | 空 | 配置后覆盖 check-interval,如 "0 */2 * * *" |
测速
| 字段 | 默认 | 说明 |
|---|---|---|
speed-test-url | GitHub release 大文件 | 测速下载地址;尽量别用 Speedtest / Cloudflare,很多节点会屏蔽 |
min-speed | 512 | 最低保留速度(KB/s),低于此值被剔除 |
download-timeout | 10 | 单节点测速时长上限(秒) |
download-mb | 20 | 单节点下载数据量上限(MB),0 不限 |
total-speed-limit | 0 | 总速度上限(MB/s),0 不限 |
流媒体与 IP 风险
| 字段 | 默认 | 说明 |
|---|---|---|
media-check | false | 是否开启流媒体检测 |
media-check-timeout | 5 | 单个平台检测超时(秒) |
platforms | iprisk tiktok youtube netflix disney openai gemini claude spotify | 要检测的平台列表 |
rename-node | true | 按 IP 归属地重命名节点,媒体标签依赖它 |
node-prefix | 空 | 节点名前缀,需 rename-node: true |
开启媒体检测后,节点名会带上标签,例如 NF(仅自制剧)、NF-US(全解锁)、GPT⁺、D+、YT-、CL-、SP-,以及 IP 风险百分比。
节点过滤
filter 是正则列表,节点名匹配任一表达式才保留;留空则不过滤。过滤发生在媒体检测与重命名之后、测速之前,所以此时名字里已有地区与媒体标签,但没有速度标签。
filter:
- "香港|HK|Hong Kong" # 只要香港
- "GPT⁺|GPT" # 只要解锁 OpenAI
- "\|[0-9]%\|" # 只要 IP 风险是个位数
监听与 API
| 字段 | 默认 | 说明 |
|---|---|---|
listen-port | :8199 | 内核 HTTP 监听;App 会改写成设置页里的地址与端口,默认 127.0.0.1:8199 |
api-key | 空 | 留空则自动生成,可在设置页查看 |
enable-web-ui | true | 是否启动上游 Web 面板 /admin |
output-dir | 空 | 内核数据目录;App 固定为私有目录下的 output |
Sub-Store 与保存方式
本 App 把 sub-store-port patch 成空字符串,因此 Sub-Store 不会启动。模板里这些字段留着只是为了兼容上游,改动它们在本 App 里没有效果。
同理,save-method(r2 / gist / webdav / s3)这些上游的远端保存方式也不使用 —— 本 App 的导出由 ExportStore 落到本地目录。
通知
| 字段 | 说明 |
|---|---|
callback-script | 检测完成后执行的脚本路径(本 App 沙箱内基本用不上) |
apprise-api-server + recipient-url | 通过自建 Apprise 服务推送通知,支持 Telegram、钉钉等 |
notify-title | 通知标题,默认「🔔 节点状态更新」 |
修改后怎么生效
- 在设置页编辑并保存
config.yaml; - 回到概览页停止内核,再重新启动;
- 日志页确认没有 YAML 解析错误(常见于缩进和中文冒号)。
The config file lives in app-private storage and is written from the bundled template on first launch; Settings can edit it in place. Restart the kernel after saving for changes to take effect.
Only the fields you are likely to touch are listed here. The full annotated template (with upstream comments) is assets/config_template.yaml in the repo, identical to the one bundled in the app.
Subscriptions
| Key | Default | Notes |
|---|---|---|
sub-urls | a few built in | Subscription URLs. A few defaults are dead upstream; edit freely |
sub-urls-retry | 3 | Retries per failing subscription |
sub-urls-concurrent | 20 | How many subscriptions are fetched at once |
sub-urls-get-ua | clash.meta (…) | User agent for fetching; random randomises it |
proxy | empty | HTTP/SOCKS5 proxy for fetching and pushing, e.g. http://user:pass@192.168.1.1:7890 |
github-proxy | empty | GitHub mirror prefix; must end with / |
Adding subscriptions:
sub-urls:
- https://example.com/api/v1/client/subscribe?token=xxxx
- https://another.example.com/sub?token=yyyy
Checking pipeline
| Key | Default | Notes |
|---|---|---|
concurrent | 50 | Concurrency for the liveness stage |
media-concurrent | 20 | Concurrency for media checks |
speed-concurrent | 20 | Concurrency for speed tests; too high and they steal each other's bandwidth |
timeout | 5000 | Max latency per node (ms) |
alive-test-url | http://gstatic.com/generate_204 | Latency probe URL |
shuffle-test-order | true | Shuffle order so neighbouring nodes do not interfere |
success-limit | 0 | Cap on kept nodes, 0 = unlimited |
check-interval | 120 | Automatic interval in minutes |
cron-expression | empty | Overrides check-interval, e.g. "0 */2 * * *" |
Speed test
| Key | Default | Notes |
|---|---|---|
speed-test-url | a large GitHub release | Download target; avoid Speedtest/Cloudflare since many nodes block them |
min-speed | 512 | Minimum kept speed (KB/s) |
download-timeout | 10 | Per-node test duration cap (s) |
download-mb | 20 | Per-node data cap (MB), 0 = unlimited |
total-speed-limit | 0 | Aggregate cap (MB/s), 0 = unlimited |
Media checks and IP risk
| Key | Default | Notes |
|---|---|---|
media-check | false | Enable streaming-unlock checks |
media-check-timeout | 5 | Per-platform timeout (s) |
platforms | iprisk tiktok youtube netflix disney openai gemini claude spotify | Platforms to test |
rename-node | true | Rename nodes by IP geolocation; media tags depend on it |
node-prefix | empty | Node name prefix; requires rename-node: true |
With media checks on, node names carry tags such as NF (Netflix originals only), NF-US (full unlock), GPT⁺, D+, YT-, CL-, SP-, plus the IP risk percentage.
Filtering nodes
filter is a list of regexes; a node is kept if its name matches any of them, and an empty list keeps everything. Filtering runs after media checks and renaming but before the speed test, so names already contain region and media tags but no speed tag.
filter:
- "Hong Kong|HK" # keep HK only
- "GPT⁺|GPT" # keep OpenAI-unlocked nodes
- "\|[0-9]%\|" # keep nodes whose IP risk is a single digit
Listening and the API
| Key | Default | Notes |
|---|---|---|
listen-port | :8199 | Kernel HTTP listen address; the app rewrites it from Settings, default 127.0.0.1:8199 |
api-key | empty | Generated automatically when empty; visible in Settings |
enable-web-ui | true | Whether the upstream panel at /admin starts |
output-dir | empty | Kernel data dir; the app pins it to output under private storage |
Sub-Store and remote saving
The app patches sub-store-port to an empty string, so Sub-Store never starts. Those keys remain only for upstream compatibility and have no effect here.
Likewise the upstream remote targets (save-method: r2 / gist / webdav / s3) are unused — exports go through ExportStore to a local folder.
Notifications
| Key | Notes |
|---|---|
callback-script | Script path to run after a check (rarely usable inside the Android sandbox) |
apprise-api-server + recipient-url | Push notifications through your own Apprise server (Telegram, DingTalk, …) |
notify-title | Notification title, default "🔔 节点状态更新" |
Applying changes
- Edit and save
config.yamlin Settings; - Go back to Overview, stop the kernel and start it again;
- Check the Logs page for YAML errors — usually indentation.