Releases: xukaaaa/CLIProxyAPIPlus
Releases · xukaaaa/CLIProxyAPIPlus
Release list
v6.9.25
v6.9.24
v6.9.23-0
v6.9.19-1-fix
v6.9.19-0
v6.9.16
v6.9.15-1
v6.9.15-0
feat: add LISTEN/NOTIFY for real-time cross-machine auth sync When multiple instances share a PostgreSQL database via PGSTORE_DSN, auth file deletions and updates were not propagated at runtime — only on restart via Bootstrap. This adds real-time synchronization using PostgreSQL LISTEN/NOTIFY: - Each instance generates a unique machineID (UUID) at startup - pg_notify() is called after every auth upsert/delete with a payload containing the operation, auth ID, and origin machineID - A dedicated pgx.Conn runs LISTEN in a background goroutine with exponential backoff reconnect (1s-30s) - Notifications from the same machineID are skipped to prevent loops - syncInProgress atomic flag prevents the file watcher from pushing remote changes back to the database (feedback loop prevention) - recentRemoteSyncs per-ID guard prevents delayed watcher events from pushing back files after syncInProgress has been cleared (TTL: 5s) - Incremental sync (diff-based, no directory wipe) runs on reconnect to catch missed notifications during connection outages - filepath.WalkDir handles subdirectories in the delete phase - Proper goroutine lifecycle: WaitGroup, listenerMu, connect timeout - Integration tests covering upsert, delete, bidirectional sync, batch, content update, self-skip, reconnect sync, feedback loop prevention, and delayed watcher race condition