Skip to content

DhruvaD1/TLS-Proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TLS Termination Proxy

TLS termination proxy for handling thousands of concurrent connections.

Features

  • 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

Usage

# 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

Monitoring

  • Metrics: http://localhost:9090/metrics
  • Admin API: http://localhost:8443/status
  • Health check: http://localhost:8443/health

API Endpoints

  • GET /status - System status and statistics
  • GET /backends - Backend server health
  • GET /websockets - Active WebSocket connections
  • GET /metrics - Prometheus metrics
  • POST /backends - Backend management

Docker

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"]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors