-
Notifications
You must be signed in to change notification settings - Fork 468
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
78 lines (69 loc) · 2.68 KB
/
config.example.yaml
File metadata and controls
78 lines (69 loc) · 2.68 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# CC Gateway Configuration
# Copy to config.yaml and modify, or use: bash scripts/quick-setup.sh
server:
port: 8443
# TLS cert/key paths (required for remote deployment, not needed for localhost)
# Generate self-signed: openssl req -x509 -newkey rsa:2048 -keyout certs/key.pem -out certs/cert.pem -days 365 -nodes
# tls:
# cert: ./certs/cert.pem
# key: ./certs/key.pem
# Upstream Anthropic API
upstream:
url: https://api.anthropic.com
# OAuth - gateway manages token lifecycle centrally
# Extract credentials from macOS Keychain:
# security find-generic-password -a "$USER" -s "Claude Code-credentials" -w | python3 -c "import sys,json; d=json.load(sys.stdin)['claudeAiOauth']; print(f'access_token: {d[\"accessToken\"]}\nrefresh_token: {d[\"refreshToken\"]}\nexpires_at: {d[\"expiresAt\"]}')"
# Or just run: bash scripts/quick-setup.sh (extracts automatically)
oauth:
access_token: "your-access-token-here"
refresh_token: "your-refresh-token-here"
expires_at: 0
# Authentication - each client gets a unique token
# Generate tokens: bash scripts/add-client.sh <name>
auth:
tokens:
- name: machine-a
token: change-me-token-1
- name: machine-b
token: change-me-token-2
# Canonical identity - all clients will appear as this single device
# Generate a fresh identity: npm run generate-identity
identity:
device_id: "0000000000000000000000000000000000000000000000000000000000000000"
email: "user@example.com"
# Canonical environment fingerprint
# Should match a real machine's profile to look natural
env:
platform: darwin
platform_raw: darwin
arch: arm64
node_version: v24.3.0
terminal: iTerm2.app
package_managers: npm,pnpm
runtimes: node
is_running_with_bun: false
is_ci: false
is_claude_ai_auth: true
version: "2.1.81"
version_base: "2.1.81"
build_time: "2026-03-20T21:26:18Z"
deployment_environment: unknown-darwin
vcs: git
# System prompt environment masking
# These values replace the <env> block in the system prompt text.
# MUST be consistent with the env section above!
prompt_env:
platform: darwin # Must match env.platform
shell: zsh # Shell name shown in prompt
os_version: "Darwin 24.4.0" # uname -sr output
working_dir: /Users/jack/projects # Canonical home directory path prefix
# Canonical process metrics (should look like a real machine)
process:
constrained_memory: 34359738368 # 32GB - pick a realistic value
rss_range: [300000000, 500000000] # 300-500MB realistic range
heap_total_range: [40000000, 80000000]
heap_used_range: [100000000, 200000000]
# Logging
logging:
level: info # debug | info | warn | error
audit: true # log which client made each request