Skip to main content

Reverse Proxy

Aegis provides a full-featured reverse proxy engine as a drop-in replacement for Nginx Proxy Manager. All proxy configuration is managed through the admin UI and stored in SQLite.

Capabilities

CapabilityDetails
Multi-host routingDomain-based routing via Host header; unlimited proxy hosts
Load balancingRound-robin, least-connections, IP-hash policies per host
Health checksActive HTTP health checks per upstream with configurable path and interval
WebSocket proxyingTransparent Upgrade/Connection header passthrough
SSL/TLS terminationLet’s Encrypt (ACME HTTP-01 via autocert) + custom certificate upload
Force HTTPSPer-host 301 redirect from HTTP to HTTPS
HSTSConfigurable max-age, includeSubDomains, preload per host
SNI routingTLS certificate selection based on SNI with custom + autocert fallback
Custom headersPer-host request and response header injection/removal
Proxy timeoutsConfigurable connect, read, write, idle timeouts
Host preservationPreserve or rewrite the upstream Host header
X-Forwarded headersAutomatic X-Forwarded-For, X-Forwarded-Host, X-Real-IP injection
Max body sizePer-host request body size limit
Enable/disableToggle hosts on/off without deleting configuration

Load Balancing Policies

PolicyDescription
Round-robinDistributes requests evenly across all healthy upstreams
Least-connectionsRoutes to the upstream with the fewest active connections
IP-hashConsistently routes the same client IP to the same upstream
Each policy is configured per proxy host. Unhealthy upstreams (as determined by health checks) are automatically removed from the rotation.

SSL/TLS

Aegis supports two certificate sources:

Let’s Encrypt (Automatic)

  • Uses ACME HTTP-01 challenge via golang.org/x/crypto/acme/autocert
  • Certificates are requested and renewed automatically
  • Requires port 80 to be reachable for challenge validation

Custom Certificates

  • Upload PEM-encoded certificate and private key through the admin UI
  • Private keys are encrypted at rest using AES-256-GCM
  • Encryption key can be auto-generated or provided via AEGIS_SSL_KEY

HSTS Configuration

Per-host HSTS headers with configurable:
  • max-age duration
  • includeSubDomains directive
  • preload directive

Proxy Host Configuration

Each proxy host supports the following settings:
SettingDescription
Domain(s)One or more domain names for routing
Upstream(s)Backend server addresses with port
Load balance policyRound-robin, least-connections, or IP-hash
SSL modeNone, Let’s Encrypt, or custom certificate
Force HTTPSRedirect HTTP to HTTPS
HSTSStrict Transport Security settings
Custom headersRequest and response header modifications
TimeoutsConnect, read, write, idle timeouts
Preserve hostForward original Host header to upstream
Max body sizeRequest body size limit
WAF modeOff, detect, or enforce
Access listOptional allow list attachment
EnabledToggle host on/off

Health Checks

Active health checks probe each upstream backend at a configurable interval:
  • Path — HTTP path to check (e.g., /health)
  • Interval — Time between checks
  • Behavior — Unhealthy upstreams are removed from the load balancer rotation and re-added when they recover