mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-06-16 13:34:04 +08:00
6a7c2df2d2
When proxy takeover is activated, tokens are replaced with placeholders in live config files. However, the proxy reads tokens from the database, not from live files. If the user's token only exists in the live config (e.g., manually added), the database won't have it, causing auth failures. Changes: - Add sync_live_to_providers() to sync tokens from live configs to DB - Add update_provider_settings_config() DAO method for partial updates - Use "PROXY_MANAGED" placeholder instead of empty string to avoid "missing API key" warnings in Claude Code status bar - Integrate sync step into start_with_takeover() flow before clearing tokens The new takeover flow: 1. setup_proxy_targets() 2. backup_live_configs() 3. sync_live_to_providers() <- NEW 4. takeover_live_configs() 5. Start proxy server
6a7c2df2d2
ยท
2025-12-11 11:57:53 +08:00
History