L4 proxy hosts configure Caddy’s layer-4 stream proxying for TCP and UDP traffic. The API provides full CRUD operations for creating and managing these stream proxy entries programmatically.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fuomag9/caddy-proxy-manager/llms.txt
Use this file to discover all available pages before exploring further.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/l4-proxy-hosts | List all L4 proxy hosts |
POST | /api/v1/l4-proxy-hosts | Create an L4 proxy host |
GET | /api/v1/l4-proxy-hosts/{id} | Get an L4 proxy host by ID |
PUT | /api/v1/l4-proxy-hosts/{id} | Update an L4 proxy host |
DELETE | /api/v1/l4-proxy-hosts/{id} | Delete an L4 proxy host |
Create an L4 proxy host
POST /api/v1/l4-proxy-hosts
Request fields
Display name for the L4 proxy host.
The transport protocol to proxy.
The address and port to listen on, e.g.
:5432 or 0.0.0.0:2222.One or more upstream addresses to forward traffic to, e.g.
["db.internal:5432"].How to match incoming connections. Use
tls_sni to route based on TLS Server Name Indication. Defaults to none.Values for the matcher (e.g. hostnames for
tls_sni or http_host).Whether to terminate TLS at Caddy rather than passing it through to the upstream.
Send proxy protocol header to the upstream to pass the real client IP. Set to
v1 or v2 to enable.Accept proxy protocol headers from upstream clients (for chained proxies).
Whether Caddy should listen on this port. Defaults to
true.Response object
Port changes trigger a Caddy container restart via the l4-port-manager sidecar. Brief downtime (a few seconds) is expected when adding or removing L4 hosts.