keysink 0.2.0 → 0.2.1
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
CHANGED
|
@@ -115,9 +115,17 @@ never smuggle its own credentials through. Everything else — method, path, bod
|
|
|
115
115
|
preserved with the auth parameter managed by the route. SSE chunks are forwarded
|
|
116
116
|
as they arrive instead of being buffered into a whole response.
|
|
117
117
|
|
|
118
|
+
Two edge refusals keep that passthrough honest: a request path containing dot
|
|
119
|
+
segments (`..`, `%2e%2e`, or their `\`-separated forms) gets a 404 — the
|
|
120
|
+
downstream URL parser collapses those, and forwarding one would let a request
|
|
121
|
+
escape the route's base_url prefix on the upstream host. `CONNECT`, `TRACE` and
|
|
122
|
+
`TRACK` get a 405 — a TRACE the upstream implements would echo the forwarded
|
|
123
|
+
headers, real key included, back to the caller.
|
|
124
|
+
|
|
118
125
|
`--auth` describes keysink → upstream only. Inbound, the vkey is accepted in any
|
|
119
|
-
of `Authorization: Bearer`, `x-api-key`, `x-goog-api-key
|
|
120
|
-
|
|
126
|
+
of `Authorization: Bearer`, `x-api-key`, `x-goog-api-key`, `api-key`,
|
|
127
|
+
`anthropic-api-key` or `openai-api-key` — the same names stripped before
|
|
128
|
+
forwarding — so the client's auth style and the route's never have to match.
|
|
121
129
|
|
|
122
130
|
Two agents on the same port can talk to two different providers, or to the same
|
|
123
131
|
provider with different keys, without either of them knowing.
|
|
@@ -139,8 +147,12 @@ Route options worth knowing:
|
|
|
139
147
|
- `--auth bearer|x-api-key|header|basic|query|none` — OpenAI is Bearer, Claude
|
|
140
148
|
`x-api-key`, Gemini `x-goog-api-key`. For anything else use `--auth header`
|
|
141
149
|
plus `--auth-header NAME` and optional `--auth-prefix 'Bearer '`
|
|
142
|
-
- `--header 'K:V'` injects static headers (repeatable)
|
|
143
|
-
|
|
150
|
+
- `--header 'K:V'` injects static headers (repeatable) — a fallback, not an
|
|
151
|
+
override: if the client sends the same header, the client's value wins.
|
|
152
|
+
Only the auth header names are protected (they cannot be set statically at
|
|
153
|
+
all); treat this as route defaults, never as enforcement;
|
|
154
|
+
`--proxy URL|direct` sets a per-route upstream proxy, defaulting to
|
|
155
|
+
`HTTP(S)_PROXY`
|
|
144
156
|
- `--retry-on-status CODE` overrides the retryable set per route (400..=599)
|
|
145
157
|
|
|
146
158
|
Common moves:
|
|
@@ -236,8 +248,11 @@ machine-level isolation stays your job (tight sudo, separate UID).
|
|
|
236
248
|
|
|
237
249
|
`--audit-log` records route, vkey fingerprint, status and latency — never
|
|
238
250
|
headers, body or query. Off by default. Five rotated generations (10 MB each)
|
|
239
|
-
are kept
|
|
240
|
-
|
|
251
|
+
are kept for real traffic. Rejected requests are throttled (1/s per
|
|
252
|
+
fingerprint, 100/s globally) and written to their own rotation chain
|
|
253
|
+
(`<audit-file>.rej`, another 5 × 10 MB) — a flood of unauthenticated requests
|
|
254
|
+
can only ever rotate its own trail away, never the forensic record of real
|
|
255
|
+
traffic.
|
|
241
256
|
|
|
242
257
|
`--listen` will bind a non-loopback address if you insist, but then TLS and
|
|
243
258
|
network exposure are yours to solve; the intended deployment is loopback only.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keysink",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Local gateway that keeps real AI API keys out of agents (Claude Code, OpenAI, MCP): agents hold revocable virtual keys, real keys stay in an encrypted vault.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "wusende",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/vendor/linux-x64/keysink
CHANGED
|
Binary file
|
|
Binary file
|