Strip the proxy. Reveal the weights.
The open-source forensic lie detector for AI gateways and masked LLM endpoints.
React 19 · TypeScript · Vite 6 · Tailwind CSS 3 · Hono 4 · Bun
MaskOff audits any OpenAI-compatible endpoint and proves which model is actually answering — not which one the proxy claims. Third-party gateways routinely rename cheap checkpoints to flagship aliases, strip model metadata, and inject system prompts to fake cutoffs. A proxy can rewrite headers and prompts; it cannot rewrite the neural network's trained weights. MaskOff measures the weights.
| Gateways do… | MaskOff detects… |
|---|---|
Mask model names (gpt-5.5 → glm-4.6-air) |
Domain architecture depth & multi-turn identity drift |
Obfuscate responses ("model": "auto") |
Mirrored/echoed model-field metadata & error leaks |
| Falsify cutoffs & origin via system prompt | Knowledge-horizon milestone contradiction & persona injection leaks |
| Route flagship prices to identical backends | Deterministic signature hashing & normalized similarity consensus |
- ⚡ Sub-3-second audit — 25+ orthogonal probes dispatched in parallel across five forensic pillars.
- 🔬 Parametric truth over prompt illusion — probes target trained behavior a proxy can't override.
- 🛡️ Zero key leakage — keys are stored locally in your browser only; never sent anywhere except the target endpoint.
- 🧾 Verifiable forensic receipt — verdict, masking-confidence score, per-pillar breakdowns, findings, and knowledge horizon, exportable as Markdown/JSON.
- 🔗 Stateless, tamper-evident share links — the full receipt is deflate-compressed into the URL and HMAC-SHA256-signed server-side; forged or edited receipts are flagged.
- 🌗 Light & dark themes — system-detected with manual override, flash-free boot.
- 🧪 Ground-truth benchmarked — 100% genuine endpoint accuracy (0 false positives) and 100% recall against known masked gateways.
RECON → PIPELINE (Identity + Cutoff + Domain) → SIGNATURE → SCORING
| Stage | What it does |
|---|---|
| RECON | Fingerprint the gateway software (Qoder, LiteLLM, OneAPI, Portkey); check whether the model field is mirrored or masked. |
| PIPELINE | Dispatches parallel traps: identity contradictions (multilingual + multi-turn), knowledge horizon calibration against dated milestones, and deep domain architecture math (MLA/MTP/GRPO/GLM/Gemini/Claude/GPT). |
| SIGNATURE | Deterministic SHA-256 and normalized token similarity cross-alias comparison against sibling endpoints. |
| SCORING | Aggregates hard evidence and circumstantial signals into a calibrated 0–100% confidence score and verdict. |
Verdicts: GENUINE · SUSPICIOUS · MASKED / FRAUDULENT.
| Layer | Tech |
|---|---|
| Frontend | React 19, TypeScript, Vite 6, Tailwind CSS 3, lucide-react |
| Styling | Custom "Forensic Instrument" design system (CSS-variable tokens, light/dark) |
| Server | Hono 4 on @hono/node-server, SSE via hono/streaming |
| Runtime | Bun |
| Streaming | Server-Sent Events (POST /api/audit) |
| Receipts | deflate + base64url stateless links, HMAC-SHA256 (node:crypto) |
Prerequisites: Bun ≥ 1.0.
# install
bun install
# test suite
bun test
# ground-truth benchmark
bun run benchmark
# dev — Vite (frontend :5173) + Hono (API :3100)
bun run dev
# production
bun run build # bundle frontend → dist/
bun start # serve API + static SPA on :3100Open http://localhost:5173 (dev) or http://localhost:3100 (prod).
docker build -t maskoff .
docker run -p 3100:3100 -e MASKOFF_SECRET="$(openssl rand -hex 32)" maskoff| Env var | Default | Purpose |
|---|---|---|
PORT |
3100 |
API / production server port |
MASKOFF_SECRET |
(ephemeral) | HMAC key for receipt signing. Set in production — unset means receipts verify only until restart. Generate: openssl rand -hex 32 |
| Endpoint | Method | Description |
|---|---|---|
/api/health |
GET | Liveness probe |
/api/audit |
POST | Run an audit; streams AuditEvent over SSE |
/api/receipt/verify |
POST | Verify a decoded receipt's HMAC signature |
POST /api/audit body
{
"baseUrl": "https://gateway.example.com/v1",
"apiKey": "sk-…",
"modelId": "qd/dfmodel",
"claimedName": "DeepSeek V4 Flash",
"claimedFamily": "auto",
"testSiblings": false
}SSE events: stage → log → probe_result → … → complete { report } (or error). The complete payload is the signed ForensicReport.
| Route | Purpose |
|---|---|
/ |
Landing — thesis, method, pipeline, CTA |
/audit |
Audit console — endpoint form, live stage stepper, forensic stream, report |
/receipt |
Specimen receipt |
/receipt/<payload> |
Shared receipt, decoded + signature-verified from the URL |
server/
index.ts Hono entry: /api routes, static dist, SPA fallback
engine/ probe pillars (recon, identity, cutoff, domain, signature),
scorer, orchestrator, sign (HMAC), canonical JSON, types, data/
tests/ Bun test suites (identity, cutoff, domain, recon, signature, scorer, fixtures)
benchmarks/ Ground-truth endpoint benchmark profiles and automated runner
src/
pages/ Landing, Audit, Receipt
components/ AuditForm, LiveTerminal, ReportCard, TimelineView, chrome,
ui/ (Panel, Button, StatusChip, Gauge, Field)
lib/ router, theme, reveal, sse-client, receipt-codec, utils
docs/DESIGN.md design-system spec
ARCHITECTURE.md system blueprint
FORENSICS_LOGIC.md probe & scoring methodology
Custom "Forensic Instrument" identity — near-black zinc / paper light themes, hairline borders, single vermilion accent, mono-forward data typography (Geist / Geist Mono / Space Grotesk). No component library; primitives live in src/components/ui/. Full spec: docs/DESIGN.md.
Open source. See repository for license details.