Merge multiple sing-box subscriptions into one JSON endpoint.
- Pulls one or more upstream subscription URLs
- Extracts/merges node outbounds
- Injects them into your
template.json - Exposes a local subscription URL via HTTP
service.ts: entrypointservice/: runtime, fetch/merge, config buildertemplate.json: public skeleton templateservice.example.json: sample runtime config
- Copy config:
cp service.example.json service.json- Edit
service.json:
listenportpathtemplatePathupstreamsrefreshIntervalSec
- Start:
npm run serve -- ./service.jsonGET {path}: generated subscription JSONGET /healthz: health infoPOST /refresh: force refresh
Build image:
docker build -t convert-service:local .Run container:
docker run --rm -p 18900:18900 \
-e CONFIG_PATH=/app/service.json \
-v ${PWD}/service.example.json:/app/service.json:ro \
-v ${PWD}/template.json:/app/template.json:ro \
convert-service:localOr compose:
docker compose up -d --build- CI:
.github/workflows/ci.yml- Runs
npm ci+npm run buildon push/PR
- Runs
- Release:
.github/workflows/release.yml- Triggered by tags like
v1.0.0 - Builds/pushes image to GHCR
- Creates GitHub Release with source tarball
- Triggered by tags like