Skip to content
GitHubOpen source
Product
Docs
Solutions
IndustriesAll industries
CompareCompare all AI data-leak tools
Benchmarks
GitHubApache-2.0

Integration modes

Shadow runs the same masking engine in three ways. You can mix them on one machine: the proxy and the gateway are served from the same port, and they share the persona and vault.

ProxyGatewayLibrary
How you connectHTTPS_PROXY=http://127.0.0.1:8877, or a PAC fileBase URL http://127.0.0.1:8877/gw/<provider>/...shadow-core crate in your Rust process
CA trust neededYes, onceNoNo
CoversAny tool that honours proxy settings and calls an intercepted AI API hostTools and SDKs that accept a base URLYour own code
Non-AI trafficTunnelled without decryptionNot involvedNot involved
Typical usersDeveloper laptops, IDEs, desktop apps, CI runnersSDK-based apps, services, containersPlatforms that call models from Rust
GuideProxy modeGateway modeEmbed in Rust

Start with the gateway if the tool lets you set a base URL. It is explicit, it needs no certificate, and you can see in the configuration that requests go through Shadow.

Use the proxy when you want every AI API client on a machine covered, including tools you don’t control. Shadow decrypts only the known AI hosts and tunnels everything else byte for byte, so banking, email and package downloads are never touched.

Embed the library when you are building the application yourself in Rust. There is no extra hop, you control exactly which strings are masked, and you can use sessions to apply the intent policy per request.

WherePattern
Laptop or workstationshadow install --apply: background service, CA trusted, proxy env in your shell
Server or VMsystemd unit, gateway URLs in the app’s environment
ContainerSidecar container on localhost:8877, gateway mode. See Docker and Kubernetes
Rust serviceshadow-core in-process, data directory on a persistent volume
Anything else that talks to an LLMSee Integrating any endpoint

Whatever the mode, a request goes through the same steps:

  1. Classify the request’s intent and pick a treatment per value (intent policy).
  2. Detect sensitive values in every string of the JSON body, plus uploaded files.
  3. Translate each value to its fake or token, recorded in the vault.
  4. Scrub identifying fields and headers (proxy and gateway only).
  5. Restore the response: JSON, server-sent events, NDJSON streams and tool-call arguments.

See How it works for the full lifecycle.