TenthMatrix WSL Proxy
API Gateway, CDN & Enterprise WAF — Product Overview
TenthMatrix WSL Proxy (WSLProxy) is TenthMatrix’s complete API gateway and CDN edge control plane. It sits in front of your origins and decides per request what happens — route, secure, cache, and observe — from live JSON and MCP configs, without reloading nginx for every rule change.
What is TenthMatrix WSL Proxy?
WSLProxy is a dynamic API gateway and reverse proxy on OpenResty. Operators manage virtual hosts, routing rules, WAF policies, cache, traffic splits, and edge POPs from an Admin UI, REST API, MCP tools, or the wslproxy-cli. Day-to-day rules take effect on the hot path; nginx reloads only when server-level listen or SSL blocks change.
Watch the overview

Watch: TenthMatrix WSL Proxy intro
Watch
Watch on YouTube: Watch: TenthMatrix WSL Proxy introwslproxy.org
Watch: WSL Proxy WAF tour
Watch
Watch on YouTube: Watch: WSL Proxy WAF tourwslproxy.org/waf
How the proxy works
Like a solutions playbook: match once, decide per request, then proxy or protect. The control plane never needs to restart the edge for ordinary rule changes.
Request arrives at a POP
Browsers, APIs, and agents hit a TenthMatrix WSL Proxy edge (Docker, bare-metal Ansible POP, or k3s Helm ingress). OpenResty accepts TLS and enters the Lua hot path.
Match a routing rule
gateway_ack.lua loads the virtual host and evaluates live rules from disk or Redis: path, IP, country, JWT, S3, cookie, and more. Priority and specificity pick the winner — no nginx reload.
Pipeline: rate limit → WAF → respond
The gateway pipeline runs rate limits, then the WAF engine (stages + signatures), then gateway_resp.lua applies the response action and balancer timeouts.
Decide the outcome
Typical outcomes: 305 reverse-proxy to an upstream, 301/302 redirect, static HTML block, CAPTCHA challenge, or 403 WAF block with support ID headers.
Balance and observe
For proxy responses, balancer_by_lua applies weighted, RR, canary, sticky, or least-conn. Health, metrics, and traffic stats feed ops and AI log hooks.
Operators & agents drive config
Humans use Admin UI / CLI; agents use REST or MCP tools to CRUD servers, rules, and WAF binds — the same surface, GitOps-friendly pull/push.
| Code | Meaning |
|---|---|
| 305 | Reverse proxy to upstream (primary gateway path) |
| 301 / 302 | Redirect |
| 200 HTML | Static / branded block or interstitial |
| CAPTCHA | Challenge before continuing |
| 403 WAF | Blocked by WAF with X-WAF-* and X-Support-ID headers |
Main product features in detail
Everything you need for a governed edge: routing, security, CDN cache, multi-POP delivery, and a control plane humans and agents can both drive.
Dynamic routing rules
Match on path, IP, country, JWT claims, S3-style keys, and cookies. Actions include reverse proxy, redirect, HTML responses, and CAPTCHA. Rules are ordered by priority with specificity tie-break so the most precise route wins without restarting nginx.
Traffic engineering
Weighted, round-robin, header-based canary, cookie sticky sessions, and least-conn balancing. Promote or rollback backends from the control plane when a canary looks healthy — or pull it back in one action.
Enterprise WAF engine v2
Policy packs bind per domain, service, and route. Stages cover method allow-lists, filetype deny, IP/geo lists, JWT algorithm policy, JSON body profiles, brute-force velocity, and OpenAPI positive security — plus governed attack signatures and anomaly scoring. Blocking or transparent (monitor) modes.
CDN & edge cache
Edge static cache, optional Docker blob cache, and Varnish hooks give you a CDN-style layer in front of origins — ideal for marketing sites, API docs, and artifact delivery alongside API gateway traffic.
SSL & HTTPS
auto-ssl / Let’s Encrypt, per-domain SSL JSON, and force-HTTPS policies so each virtual host can terminate TLS correctly at the POP.
Multi-POP + DNS
Declare edge locations and provision Cloudflare A-records with safety guardrails. A common production pattern is public POP → k3s NodePort → wslproxy-ingress Helm → app pods.
Control plane
React Admin and Next.js dashboards, Swagger REST, MCP tools for Claude/Cursor, and the wslproxy-cli image (ghcr.io/bwalia/wslproxy-cli) for pull/push/diff/verify workflows.
Deploy anywhere
Docker Compose for labs, Ansible for bare-metal or VM POPs, and Helm ingress-controller charts for k3s / Kubernetes — one product surface across environments.
Observability
/health, /healthz, /ready, Prometheus /metrics, traffic stats, structured WAF security logs, and AI log analysis hooks for SRE teams.
WAF rules & enforcement
The WAF runs in the OpenResty request path (inspired by enterprise NGINX WAF patterns). It is fail-open by default so a WAF bug cannot take the site down, explainable on every block, and backward compatible with simple v1 rule lists. For a guided tour and deep dive, see the related reading below — or watch the WAF video on this page.
Request-path pipeline
- rewrite_by_lua: gateway_ack.lua selects the routing rule
- gateway_pipeline.execute(): rate-limit → WAF → continue
- waf_engine.inspect(): load policy, resolve binding, run stages, then signatures
- On block: 403 + X-WAF-Block, X-WAF-Rule, X-WAF-Violation, X-Support-ID
Stage pipeline (before signatures)
| Code | Stage | Detail |
|---|---|---|
| VIOL_METHOD | Method allow-list | Only permitted HTTP methods (e.g. GET, POST, HEAD, OPTIONS). |
| VIOL_FILETYPE | Filetype deny | Block sensitive extensions such as .env, .sql, .bak, .git, .pem. |
| VIOL_IP_DENY / VIOL_GEO | IP lists & geo | Allow/deny CIDRs and deny countries via IP2Location-style DB. |
| VIOL_JWT_ALG | JWT algorithm policy | Deny weak algs (none, HS256); require RS256/ES256 where needed. |
| VIOL_JSON_SIZE / DEPTH | JSON body profile | Cap JSON depth and body size to stop parser abuse. |
| VIOL_BRUTE_FORCE | Brute-force velocity | Per-path sliding windows (e.g. /api/login) keyed by IP. |
| VIOL_OPENAPI_* | OpenAPI positive security | Allow only declared path+method surfaces (templated paths). |
Signature rules & governance
Each signature has a stable ID (the addressable unit), category/set, severity, match target (url, args, body, headers, cookies, UA, or all), regex or string pattern, action (block or monitor), and anomaly score.
disable
signatures.disable skips a rule entirely.
stage
signatures.stage alarms only until a timestamp — safe rollout that never contributes to anomaly score while staged.
signature sets
Toggle whole sets (e.g. SET_SQLI) between block and alarm without rewriting every rule.
anomaly threshold
Cumulative score ≥ threshold raises VIOL_ANOMALY_SCORE even if no single signature alone would block.
Binding precedence
Most specific wins: route override → per-server waf_mode_override → policy default enforcementMode (blocking or transparent/monitor). Every finding records which binding won so logs answer “why was this blocked?”
Blocking
Violations return 403 with support ID and optional branded block page.
Transparent / monitor
Violations alarm and log only — ideal for dry-run and staging.
Agents Gateway & MCP Gateway
TenthMatrix is extending WSL Proxy into the agent era. The same edge that fronts HTTP APIs will govern how agents and Model Context Protocol (MCP) clients reach tools and backends.
In progress
MCP Gateway (in progress)
A governed front door in front of external MCP servers — auth bridging, tool/method allow-deny lists, audit of tools/call, and per-tool rate limits. Clients never hold upstream tokens.
In progress
Agents Gateway (in progress)
Policy, routing, and observability for multi-agent traffic — so agent fleets hit origins through the same TenthMatrix WSL Proxy edge as your APIs and CDN workloads.
Available
MCP management surface (available)
WSLProxy already exposes its own Admin surface as MCP tools for Claude, Cursor, and other agents — configure rules and inspect the edge without leaving your IDE.
Solution architecture
Clients and agents hit a TenthMatrix WSL Proxy POP. The edge matches live rules, applies WAF and cache, then balances to origins. Operators drive everything through Admin UI, REST, MCP, or CLI.
Edge POP
OpenResty + Lua hot path: match rules, respond, balance backends.
Live config
Rules, WAF, and traffic splits from disk or Redis — no nginx reload for day-to-day changes.
Control plane
Admin UI, REST, MCP, and wslproxy-cli for humans and agents.
Origins
APIs, k3s services, static sites, and future MCP / agent upstreams.
Continue on the product site
Visit wslproxy.org for demos, docs, and the latest TenthMatrix WSL Proxy releases.
Get TenthMatrix WSL Proxy
Explore the product on wslproxy.org, read the WAF deep dive on TenthMatrix, or talk to us about edge, CDN, WAF, and agent gateway deployments.