TLS termination proxy for handling thousands of concurrent connections.
- Async I/O with Tokio (100k+ concurrent connections)
- TLS 1.2/1.3 termination
- Multiple load balancing strategies (round-robin, least-connections, IP hash, weighted, random)
- Zero-copy bidirectional stream forwarding
- Prometheus metrics and structured logging
- Multi-tier rate limiting with token bucket algorithm
- Circuit breaker pattern for automatic failover
- Full WebSocket proxying with session management
- Sticky sessions using cookies or headers
- Hot certificate reloading and expiry monitoring
- Comprehensive admin API for runtime management
# Basic usage
tls-proxy -c config.yaml
# Validate configuration
tls-proxy --validate-config -c config.yaml
# Debug mode
tls-proxy -c config.yaml -l debug- Metrics:
http://localhost:9090/metrics - Admin API:
http://localhost:8443/status - Health check:
http://localhost:8443/health
GET /status- System status and statisticsGET /backends- Backend server healthGET /websockets- Active WebSocket connectionsGET /metrics- Prometheus metricsPOST /backends- Backend management
FROM rust:1.70-slim as builder
WORKDIR /app
COPY . .
RUN cargo build --release
FROM debian:bullseye-slim
COPY --from=builder /app/target/release/tls-proxy /usr/local/bin/
EXPOSE 443 9090 8443
CMD ["tls-proxy"]