better-ccflare 3.5.38 → 3.5.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -25
- package/dist/better-ccflare +0 -0
- package/package.json +56 -56
package/README.md
CHANGED
|
@@ -157,7 +157,7 @@ Continue to [Configure Claude SDK](https://github.com/tombii/better-ccflare#conf
|
|
|
157
157
|
|
|
158
158
|
### Environment Variables
|
|
159
159
|
|
|
160
|
-
better-ccflare supports several environment variables for configuration:
|
|
160
|
+
better-ccflare supports several environment variables for configuration. The most commonly used ones:
|
|
161
161
|
|
|
162
162
|
```bash
|
|
163
163
|
# Server Configuration
|
|
@@ -186,40 +186,18 @@ RETRY_ATTEMPTS=3 # Number of retry attempts
|
|
|
186
186
|
RETRY_DELAY_MS=1000 # Initial retry delay in milliseconds
|
|
187
187
|
RETRY_BACKOFF=2 # Retry backoff multiplier
|
|
188
188
|
|
|
189
|
-
# Overload retry (529 no-reset in-place retry before account cooldown)
|
|
190
|
-
CCFLARE_OVERLOAD_RETRY_ENABLED=true # Set to "false" to disable (default: true)
|
|
191
|
-
CCFLARE_OVERLOAD_RETRY_MAX_ATTEMPTS=2 # Total attempts incl. original (default: 2)
|
|
192
|
-
CCFLARE_OVERLOAD_RETRY_BASE_MS=750 # Backoff base in ms; 0 = no sleep (default: 750)
|
|
193
|
-
CCFLARE_OVERLOAD_RETRY_MAX_MS=3000 # Backoff ceiling in ms (default: 3000)
|
|
194
|
-
|
|
195
|
-
# Health endpoint
|
|
196
|
-
HEALTH_DETAIL_ENABLED=false # Enable ?detail=1 on /health to expose per-account status (default: off, set true for internal monitoring)
|
|
197
|
-
|
|
198
|
-
# Agent Discovery
|
|
199
|
-
BETTER_CCFLARE_DISCOVER_PLUGIN_AGENTS=false # Set to true to discover agents distributed by Claude Code plugins
|
|
200
|
-
# (reads ~/.claude/plugins/installed_plugins.json)
|
|
201
|
-
|
|
202
189
|
# Storage
|
|
203
190
|
STORE_PAYLOADS=false # Disable storing request/response bodies (reduces DB size and memory usage)
|
|
204
191
|
# Token counts, costs, model, status and timing are still recorded
|
|
205
|
-
|
|
206
|
-
# Payload encryption at rest (optional)
|
|
207
|
-
# When set, request/response payloads are encrypted with AES-256-GCM before
|
|
208
|
-
# being written to `request_payloads`. Existing plaintext rows remain readable.
|
|
209
|
-
# Generate with: openssl rand -hex 32
|
|
210
|
-
PAYLOAD_ENCRYPTION_KEY= # 64-character hex (32 bytes / AES-256). Unset = plaintext storage.
|
|
211
192
|
```
|
|
212
193
|
|
|
213
|
-
**Encryption notes**:
|
|
214
|
-
- Without a key, payloads are stored as plaintext (no behavior change from prior versions).
|
|
215
|
-
- Losing the key makes encrypted rows unreadable — payload reads throw rather than silently returning garbage. Back the key up alongside the database.
|
|
216
|
-
- The key is read once at process start (and once per Bun worker). Rotating it requires a re-encrypt migration; not yet built.
|
|
217
|
-
|
|
218
194
|
**Security Notes**:
|
|
219
195
|
- Use `BETTER_CCFLARE_HOST=127.0.0.1` to bind only to localhost for better security
|
|
220
196
|
- Never commit `.env` files containing sensitive values to version control
|
|
221
197
|
- Use environment-specific configuration for production deployments
|
|
222
198
|
|
|
199
|
+
📖 **See [docs/configuration.md](docs/configuration.md) for the complete list** — overload/rate-limit retry tuning, health endpoint detail, agent discovery, payload encryption at rest, model catalog refresh, PostgreSQL pooling, Codex prompt-cache keys, and more.
|
|
200
|
+
|
|
223
201
|
### Using .env Files
|
|
224
202
|
|
|
225
203
|
better-ccflare automatically supports `.env` files for easy configuration management. You can create a `.env` file in your project directory:
|
package/dist/better-ccflare
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
2
|
+
"name": "better-ccflare",
|
|
3
|
+
"version": "3.5.39",
|
|
4
|
+
"description": "Load balancer proxy for Claude API with intelligent distribution across multiple OAuth accounts to avoid rate limiting",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/tombii/better-ccflare.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/tombii/better-ccflare#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/tombii/better-ccflare/issues"
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"better-ccflare": "dist/better-ccflare"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"dev": "bun run src/main.ts",
|
|
20
|
+
"build": "mkdir -p dist && bun -e \"const fs=require('fs'); if (!fs.existsSync('../../packages/database/src/inline-vacuum-worker.ts')) { fs.writeFileSync('../../packages/database/src/inline-vacuum-worker.ts', 'export const EMBEDDED_VACUUM_WORKER_CODE = \\\"\\\";'); }\" && bun -e \"const fs=require('fs'); if (!fs.existsSync('../../packages/database/src/inline-incremental-vacuum-worker.ts')) { fs.writeFileSync('../../packages/database/src/inline-incremental-vacuum-worker.ts', 'export const EMBEDDED_INCREMENTAL_VACUUM_WORKER_CODE = \\\"\\\";'); }\" && bun -e \"const fs=require('fs'); if (!fs.existsSync('../../packages/database/src/inline-integrity-check-worker.ts')) { fs.writeFileSync('../../packages/database/src/inline-integrity-check-worker.ts', 'export const EMBEDDED_INTEGRITY_CHECK_WORKER_CODE = \\\"\\\";'); }\" && bun build ../../packages/database/src/vacuum-worker.ts --outfile dist/vacuum-worker.js --target=bun --minify && bun -e \"const fs=require('fs'); const code=fs.readFileSync('dist/vacuum-worker.js','utf8'); const encoded=Buffer.from(code).toString('base64'); fs.writeFileSync('../../packages/database/src/inline-vacuum-worker.ts', 'export const EMBEDDED_VACUUM_WORKER_CODE = \\\"' + encoded + '\\\";');\" && bun build ../../packages/database/src/incremental-vacuum-worker.ts --outfile dist/incremental-vacuum-worker.js --target=bun --minify && bun -e \"const fs=require('fs'); const code=fs.readFileSync('dist/incremental-vacuum-worker.js','utf8'); const encoded=Buffer.from(code).toString('base64'); fs.writeFileSync('../../packages/database/src/inline-incremental-vacuum-worker.ts', 'export const EMBEDDED_INCREMENTAL_VACUUM_WORKER_CODE = \\\"' + encoded + '\\\";');\" && bun build ../../packages/database/src/integrity-check-worker.ts --outfile dist/integrity-check-worker.js --target=bun --minify && bun -e \"const fs=require('fs'); const code=fs.readFileSync('dist/integrity-check-worker.js','utf8'); const encoded=Buffer.from(code).toString('base64'); fs.writeFileSync('../../packages/database/src/inline-integrity-check-worker.ts', 'export const EMBEDDED_INTEGRITY_CHECK_WORKER_CODE = \\\"' + encoded + '\\\";');\" && rm -f dist/better-ccflare && bun build src/main.ts --compile --outfile dist/better-ccflare --target=bun --minify --define __BETTER_CCFLARE_VERSION__='\\\"'$(node -p \"require('./package.json').version\")'\\\"' && rm -f dist/vacuum-worker.js dist/incremental-vacuum-worker.js dist/integrity-check-worker.js",
|
|
21
|
+
"build:multi": "bun run build-multi-arch.ts",
|
|
22
|
+
"build:linux-amd64": "bun run build && bun build src/main.ts --compile --outfile dist/better-ccflare-linux-amd64 --target=bun-linux-amd64 --minify",
|
|
23
|
+
"build:linux-arm64": "bun run build && bun build src/main.ts --compile --outfile dist/better-ccflare-linux-arm64 --target=bun-linux-arm64 --minify",
|
|
24
|
+
"build:macos-x86_64": "bun run build && bun build src/main.ts --compile --outfile dist/better-ccflare-macos-x86_64 --target=bun-darwin-x64 --minify",
|
|
25
|
+
"build:macos-arm64": "bun run build && bun build src/main.ts --compile --outfile dist/better-ccflare-macos-arm64 --target=bun-darwin-arm64 --minify",
|
|
26
|
+
"build:windows-x64": "bun run build && bun build src/main.ts --compile --outfile dist/better-ccflare-windows-x64.exe --target=bun-windows-x64 --minify",
|
|
27
|
+
"prepublishOnly": "cp ../../README.md . && bun run --cwd ../.. build:dashboard && bun run build && jq 'del(.dependencies[\"@better-ccflare/cli-commands\", \"@better-ccflare/config\", \"@better-ccflare/core\", \"@better-ccflare/core-di\", \"@better-ccflare/database\", \"@better-ccflare/logger\", \"@better-ccflare/server\"])' package.json > package.json.tmp && mv package.json.tmp package.json",
|
|
28
|
+
"postpublish": "chmod +x dist/better-ccflare"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=18.0.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^20.0.0"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"dotenv": "^17.4.0"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist/better-ccflare",
|
|
41
|
+
"README.md"
|
|
42
|
+
],
|
|
43
|
+
"keywords": [
|
|
44
|
+
"claude",
|
|
45
|
+
"anthropic",
|
|
46
|
+
"api",
|
|
47
|
+
"proxy",
|
|
48
|
+
"load-balancer",
|
|
49
|
+
"rate-limiting",
|
|
50
|
+
"oauth",
|
|
51
|
+
"cli",
|
|
52
|
+
"analytics",
|
|
53
|
+
"monitoring"
|
|
54
|
+
],
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public"
|
|
57
|
+
}
|
|
58
58
|
}
|