Skip to content

jev-safety-gateway

Go reverse proxy between nginx and an LLM backend that extracts each request's user input, asks Jev if it is harmful, and blocks or passes.

ProxybetaAGPL-3.0

Overview

JEV Safety Gateway is a content-safety reverse proxy, documented mainly in Chinese, that sits between nginx and an LLM backend such as new-api or any OpenAI-compatible service. For each request it extracts the user input according to the API path and asks Jev whether it is risky (sexual content, violence, jailbreaks, manipulation and so on). Harmful requests get a 403; normal requests are forwarded unchanged, including streaming responses.

It understands OpenAI, Anthropic and Gemini request formats across chat, completions, embeddings, moderation, messages, rerank, image and generateContent endpoints, falling back to generic text collection for unknown paths, and is language-agnostic. Before checking, it strips client-injected context such as system-reminder blocks and decodes base64 segments to resist bypasses. It rotates multiple TypeSafe keys on errors, supports configurable thresholds, instructions and block messages, can fail open or closed when Jev is down, and rate-limits abusive IPs. A Vue admin console shows traffic, verdict mix, risk distributions and filterable audit logs, with snippet recording off by default. It deploys with Docker and SQLite and is AGPL-3.0.

What the decision model decides

TypeQuestionAnswers
Yes / noIs this user input harmful (sexual content, violence, jailbreak, manipulation)?(inferred)yes · no
ScoreWhat is the risk score of this input?(inferred)—

How it works

  1. Receive a request from nginx
  2. Extract and sanitise user input (strip injected context, decode base64)
  3. Ask Jev for a risk judgment
  4. Block with 403 above threshold, otherwise forward transparently
  5. Log verdicts and apply IP abuse limits

Strengths

  • Transparent proxy for multiple API formats
  • Bypass-resistant input sanitisation
  • Configurable fail-open or fail-closed
  • Admin console with audit and analytics

Caveats

  • AGPL-3.0 licence
  • Public demo instance must not be used with real keys
  • Requires TypeSafe keys

Getting started

Run the published Docker image with data and geoip volumes as described in the README, then configure keys in the console.

At a glance

Type
Proxy
Status
beta
Language
Go
Runtime
Reverse proxy with Vue admin console
Has code
yes
License
AGPL-3.0

Use cases and integrations

How curated lists describe it

  • This project integrates Jev to provide structured decisions for its workflow. See the repository for implementation details.

    logicrw/awesome-jev-projects
  • 位于 nginx 与大模型后端之间的前置过滤反向代理:逐请求提取用户输入交给 JEV 判定,有害拦截、正常透明放行.

    hellogumbo/awesome-jev
  • Go reverse proxy that sits between nginx and a model backend, judges each request's user input, blocks the harmful ones and passes the rest through untouched. Chinese.

    MrJev/awesome-jev

Frequently asked questions

What does Jev decide?

Whether each request's user input is harmful and how risky it is.

What happens if Jev is down?

You choose fail-open (pass) or fail-closed (block).

Does it store user text?

Not by default; snippet recording is off and audit logs keep only verdicts and scores.

Related projects

  • Gateway admission control that asks Jev what each incoming request is trying to do, filtering prompt injection and abuse.

    AppbetaLua
  • Text review gateway between clients and AI services that classifies each user input with Jev and blocks or logs per configured scenarios.

    LibrarybetaGo
  • Large catalog of Claude Code agents, commands, hooks and MCPs, listed with community Jev mods for guardrails and subagent models.

    CLIproductionJavaScript
  • Python/TypeScript/Go chatbot safety library checking user input and bot replies with Jev and returning one actionable verdict per message.

    LibraryproductionPython
  • MCP proxy and hooks that screen agent tool calls before they run and their results before the agent reads them, using Jev judgments.

    MCP serverbetaTypeScript
  • Xano backend template where Jev judges each agent tool call as safe, needs review or dangerous, and uncertain calls wait for a human.

    ProjectbetaXanoScript