Overview
SBproxy is a reverse proxy first. Before it routes to an AI provider or federates an MCP server, it does the job Nginx, Envoy, or Kong do: match a hostname, authenticate the caller, apply rate limits and a WAF, load-balance across upstreams, and proxy the request. This page is the entry point for that pillar. If you are putting SBproxy in front of an existing HTTP API, or evaluating it as a replacement for a reverse proxy you already run, start here.
Minimal config
The smallest working gateway is one origin with a proxy action:
proxy:
http_bind_port: 8080
origins:
"myapp.example.com":
action:
type: proxy
url: https://test.sbproxy.dev
sbproxy serve -f examples/basic-proxy/sb.yml
curl -H 'Host: myapp.example.com' http://127.0.0.1:8080/echo
The Host header picks the origin. Everything else on this page, load balancing, auth, WAF, rate limits, scripting, is additive configuration on the same shape, and none of it requires touching AI or MCP features.
Routing and traffic shaping
An origin matches an exact hostname or a dynamic forward rule, then dispatches to an action. Zero-downtime reload validates and compiles a candidate configuration, swaps it in atomically on success, and lets in-flight requests finish on the pipeline they started with. Blue-green and canary rollouts are configuration patterns layered on top of this.
Load distribution across upstreams supports 8 algorithms, including round-robin, least connections, and ketama-style consistent hashing, with active health checks, a circuit breaker, and outlier detection independently removing failing targets from the pool. See Routing for the full reference on hostname matching, forward rules, and load balancing.
Protocols
SBproxy terminates HTTP/2 and proxies WebSocket, gRPC, and GraphQL traffic through the same origin, auth, policy, and transform pipeline as a proxy action. HTTP/2 is negotiated automatically over TLS via ALPN. WebSocket, gRPC (with gRPC-Web bridging and REST-to-gRPC transcoding), and GraphQL are each a dedicated action type rather than a proxy variant, so each gets its own field set.
Authentication and authorization
Ten built-in auth types cover the common cases: API key, Basic, Bearer, JWT with JWKS, Digest, Forward Auth, mTLS, Web Bot Auth, CAP, and OIDC. Configure one per origin under auth:. See Authentication for the field reference.
Rate limiting, WAF, and abuse controls
The built-in WAF ships a curated CRS-derived baseline, extendable through a signed remote rule feed. It is a baseline layer, not full OWASP CRS coverage; see Security for what it catches and the three ways to close the gap when you need more. Token-bucket rate limiting, DDoS mitigation, and HTTP request-smuggling defenses run alongside it.
Custom logic
When declarative config is not enough, SBproxy gives you four extension surfaces that load from config and hot-reload: CEL, Lua, JavaScript, and WebAssembly. They rewrite headers, transform payloads, or implement bespoke policy and auth logic, with no rebuild of the binary. See Extensibility for choosing among them and Transforms for the built-in response transform catalog.
OpenAPI and the admin API
SBproxy can emit an OpenAPI 3.0 document from a live config and validate incoming request bodies against one at startup. See OpenAPI Emission. The admin API is the separate control plane for configuration, keys, metrics, and logs. Keep it on a protected network; a successful data-plane request never requires an admin-plane one.