mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
c42a0dccaf
When the app crashes or is force-killed while proxy mode is active, the live config files remain pointing to the dead proxy server with placeholder tokens, causing CLI tools to fail. This change adds startup detection: - Check `live_takeover_active` flag on app launch - If flag is true but proxy is not running → abnormal exit detected - Automatically restore live configs from database backup - Clear takeover flag and delete backups The recovery runs before auto-start, ensuring correct sequence even when proxy auto-start is enabled.