# mholt/caddy-l4

Layer 4 (TCP/UDP) app for Caddy

Repository: https://github.com/mholt/caddy-l4
Canonical: https://ross.abutalabs.com/products/caddy-l4
Language: Go
License: Apache-2.0
License Family: permissive
Last push: 2026-08-01T18:43:10+00:00

## Health v2 (maintenance only)
Score: 91/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 81, longevity 100
- inputs: {"age_days": 2305, "days_push": 32, "days_rel": 48, "gap_med": 63.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1756, forks 121 (observed 2026-08-28T04:05:32.079411+00:00)

## What it is
A layer 4 (TCP/UDP) app for Caddy that enables composable handling of raw connections based on connection properties or stream content. It supports routing, TLS termination, proxying, echoing, blocking, and throttling via Caddy-style matchers and handlers.

## Use cases
- proxy raw TCP traffic to a backend server
- route connections by TLS SNI or HTTP Host without terminating TLS
- terminate TLS then forward HTTP to one port and other protocols elsewhere
- block connections from specific IP ranges
- echo server for testing TCP/UDP clients
- multiplex SSH, HTTP, and HTTPS on a single port
- throttle bandwidth to simulate slow clients

## When to choose
- you already use Caddy and need TCP/UDP routing alongside HTTP
- you need protocol sniffing and SNI-based routing on raw sockets
- you want declarative JSON or Caddyfile config for layer 4 proxying

## When to avoid
- you need a battle-tested production L4 load balancer with zero breaking changes
- you need UDP-specific features beyond basic proxying
- you don't use Caddy and want a standalone proxy

## Facets
- artifact type: plugin
- maturity: active
- function: proxy, routing, middleware, networking, security
- domain: networking, backend, self-hosted
- platform: windows, cross-platform, go
- tags: caddy, layer4, tcp, udp, tls-termination, stream-proxy, protocol-detection, sni-routing, devops, linux, macos

## Member repositories
- mholt/caddy-l4 (main) score 91

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:32.079411+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:27:52.552138+00:00, confidence not recorded.
  - readme: https://github.com/mholt/caddy-l4 (fetched 2026-08-28T04:05:32.079411+00:00, sha 254cfbb5ab83)
- Data as of 2026-08-30T08:39:29.467469+00:00.
