9router/src/lib
Nguyen Thanh Dat 92259214db fix(security): require proof that x-9r-real-ip came from the socket (GHSA-pjm4-8fpg-f9p6)
x-9r-real-ip and the Host fallback were trusted from client-controlled
headers whenever custom-server.js was not in the request path (npm run
start, start:bun), letting a remote caller pose as local to skip API key
auth and reach LOCAL_ONLY_PATHS (/api/mcp/*, /api/tunnel/enable,
/api/auth/reset-password).

custom-server.js now generates a per-process secret at boot and stamps it
as x-9r-peer-token on every request it sanitizes. hasTrustedPeerHeaders()
(src/lib/auth/trustedPeer.js) gates trust in x-9r-real-ip on that secret;
otherwise the guard falls back to Host only in development, and fails
closed in production. Same gate on loginLimiter.getClientIp() so a spoofed
header cannot rotate the login lockout bucket.

Also: fix isLoopbackHostname for IPv6 (::1, ::ffff:127.0.0.1) which the
old split(":")[0] reduced to empty string; route npm run start /
start:bun through custom-server.js (postbuild copies it into
.next/standalone, build-cli.js fails without it) so documented deployments
keep passwordless local access.
2026-08-14 16:33:58 +07:00
..
auth fix(security): require proof that x-9r-real-ip came from the socket (GHSA-pjm4-8fpg-f9p6) 2026-08-14 16:33:58 +07:00
db fix(security): require proof that x-9r-real-ip came from the socket (GHSA-pjm4-8fpg-f9p6) 2026-08-14 16:33:58 +07:00
headroom feat(headroom): activate/uninstall extras + fix interpreter detection 2026-07-10 17:32:45 +07:00
mcp fix: DB backup on schema change, MCP child cleanup, codex models, usage providers OOM 2026-07-10 13:08:58 +07:00
network feat(proxy-pools): auto-rotate strategy for no-auth providers (#2409) 2026-07-10 16:05:07 +07:00
oauth fix(oauth): scope antigravity header fixes to loadCodeAssist/onboardUser only 2026-08-05 16:40:09 +07:00
pxpipe feat(pxpipe): PXPIPE token saver — multimodal prompt compression (#2465) 2026-07-10 16:10:42 +07:00
qoder refactor(open-sse): registry consolidation + DRY media/oauth/adhoc cleanup 2026-06-14 13:15:48 +07:00
tunnel fix(tunnel): preserve successor cloudflared PID 2026-07-23 16:22:47 +07:00
updater chore: release v0.4.27 2026-05-09 22:48:07 +07:00
appUpdater.js # v0.4.29 (2026-05-10) 2026-05-10 21:56:40 +07:00
consoleLogBuffer.js Fix usage logging dedupe and reduce stats churn 2026-06-26 10:22:20 +07:00
dataDir.js fix(mitm): update Kiro API endpoint to runtime.us-east-1.kiro.dev 2026-06-08 09:43:45 +07:00
disabledModelsDb.js feat(db): migrate from lowdb to SQLite with repos pattern 2026-05-09 17:48:20 +07:00
grokBuildConfig.js feat(cli-tools): configure Grok Build subagent models 2026-07-19 13:35:38 +07:00
localDb.js feat(db): migrate from lowdb to SQLite with repos pattern 2026-05-09 17:48:20 +07:00
mitmAliasCache.js # v0.4.29 (2026-05-10) 2026-05-10 21:56:40 +07:00
providerNormalization.js feat(xai): add xAI Grok provider with OAuth + API key auth + image 2026-05-21 11:33:18 +07:00
requestDetailsDb.js fix: DB backup on schema change, MCP child cleanup, codex models, usage providers OOM 2026-07-10 13:08:58 +07:00
usageDb.js feat(db): migrate from lowdb to SQLite with repos pattern 2026-05-09 17:48:20 +07:00