This file provides guidance to Claude Code when working with this repository.
The repository supports two independent operating modes:
config.server.jsonruntime/runtime-statecfstconfig.router.jsonrouter_local.confcfip_runtime/The old config.json and config.example.json are deprecated and should not be reintroduced.
env PYTHONPYCACHEPREFIX=/tmp/pycache python3 -m py_compile scripts/domain_updater.py
bash -n scripts/run_update_and_commit.sh
bash -n scripts/install_debian.sh
bash -n scripts/uninstall_debian.sh
sh -n scripts/router_local_update.sh
sh -n scripts/router_local_http.sh
python3 scripts/domain_updater.py --config config.server.json
python3 scripts/domain_updater.py --config config.router.json
python3 scripts/domain_updater.py --config config.server.json --print-output-settings
python3 scripts/domain_updater.py --config config.router.json --print-output-settings
bash scripts/run_update_and_commit.sh config.server.json
bash scripts/run_update_and_commit.sh --force-commit config.server.json
# or
GIT_FORCE_COMMIT=1 bash scripts/run_update_and_commit.sh config.server.json
sh scripts/router_local_update.sh ./router_local.conf
sh scripts/router_local_http.sh ./router_local.conf
sudo bash scripts/install_debian.sh --config config.server.json
sudo bash scripts/install_debian.sh --config config.server.json --interval 5min
sudo bash scripts/install_debian.sh --config config.server.json --git-push 0
sudo bash scripts/uninstall_debian.sh
sudo bash scripts/uninstall_debian.sh --keep-auth-files
tests/ directory yet.--print-output-settings is the quickest way to verify output path resolution without performing a full update.scripts/domain_updater.py is the shared core:
source.type = "api" and source.type = "cfst_local"config.server.json defines:
runtime/scripts/run_update_and_commit.sh:
domain_updater.py --print-output-settingsruntime-stateThere are two router-side entry styles:
config.router.json
domain_updater.pycfstcfip_runtime/router_local.conf
scripts/router_local_update.shscripts/router_local_http.sh prefers the configured full BusyBox binary (BUSYBOX_BIN, default ./busybox_armv7l) and uses its httpd applet; ASUS/system httpd is not used automaticallysubstore/operator_template.js:
domain or ipserver for matched nodesscriptResourceCache with a short TTLconfig.server.jsonMain blocks:
sourceapiparserrecord_mappingrecord_filterdomain_filterscoringhealthcheckselectionoutputnotifyconfig.router.jsonMain blocks:
sourcecfst_localdomain_filterhealthcheckselectionoutputnotifyrouter_local.confMain groups:
CFST_*TOP_NRUNTIME_DIRVALUE_*STATE_*EXPORT_*HTTP_PORTruntime-state.runtime/ and cfip_runtime/ are ignored on main; runtime artifacts are meant to be ephemeral locally.state.json matters for fallback behavior in both modes.runtime/current_domain.txt; use config-driven paths instead.