Add ark-429-autoban plugin (v0.1.1, re-submission of #77 after security fixes) - #85
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugin
ark-429-autobanRe-submission of #77 (closed during the security audit) with the audit feedback fully addressed in wyx1818/ark-429-autoban#1:
/bans,/unban,/unban-all,/reload-config) moved from the unauthenticated/v0/resource/plugins/route family to authenticated management routes under/v0/management/plugins/ark-429-autoban/, protected by the CPA Management Key middleware./v0/resource/plugins/now serves passive static assets only (status page, css, js).What it does
ark-429-autobanis a Scheduler + UsagePlugin for CLIProxyAPI that auto-isolates Volcano Engine ARK API keys on HTTP 429.When an ARK key returns 429 (quota exhaustion or server overload), the plugin parses the reset time from the response body and temporarily removes that key from the scheduler candidate pool. The key is automatically re-enabled once its reset time passes - no timers needed, ban expiry is checked lazily on each scheduler pick. Bans are also persisted to a JSON file and restored on CPA restart.
Release evidence (v0.1.1)
The v0.1.1 release is published, non-draft, and non-prerelease.
Published assets:
ark-429-autoban_0.1.1_linux_amd64.zipchecksums.txtChecksum verification:
The ZIP contains exactly one correctly named dynamic library at its root:
Validation
registry.jsonparses successfullyhttps://github.com/{owner}/{repo}formatversionfield omitted so CPA resolves the latest release tagv<version>format (v0.1.1)sha256sum -c checksums.txtark-429-autoban.sogit diff --checkpassesregistry.json(adds one entry, no modifications to existing entries)