Skip to content

Releases: xukaaaa/CLIProxyAPIPlus

v6.9.25

Choose a tag to compare

@xukaaaa xukaaaa released this 28 May 01:35

v6.9.25

v6.9.24

Choose a tag to compare

@xukaaaa xukaaaa released this 06 May 08:29

v6.9.24

v6.9.23-0

Choose a tag to compare

@xukaaaa xukaaaa released this 12 Apr 03:32

v6.9.23-0

v6.9.19-1-fix

Choose a tag to compare

@xukaaaa xukaaaa released this 10 Apr 05:47

v6.19.1-fix

v6.9.19-0

Choose a tag to compare

@xukaaaa xukaaaa released this 09 Apr 21:34

v6.9.19-0

v6.9.16

Choose a tag to compare

@xukaaaa xukaaaa released this 07 Apr 12:20

v6.9.16

v6.9.15-1

Choose a tag to compare

@xukaaaa xukaaaa released this 06 Apr 17:52

Changelog

  • c82e696 fix: sync disabled auth state through postgres

v6.9.15-0

Choose a tag to compare

@xukaaaa xukaaaa released this 06 Apr 11:34
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