; Minimal stunnel config for SSL termination with PROXY Protocol v2
;
; Usage:
;   stunnel eg/ssl-proxy/stunnel.conf
;
; Test:
;   curl -k https://localhost:8443/
;
; PROXY Protocol v2 sends:
;   - Real client IP address
;   - Destination port (8443)
;   - SSL/TLS connection info
;
; Feersum will:
;   - Set REMOTE_ADDR to real client IP
;   - Set psgi.url_scheme to "https" (via PP2_TYPE_SSL or X-Forwarded-Proto)

foreground = yes
pid =

[https]
accept = 8443
connect = /tmp/feersum.sock
cert = eg/ssl-proxy/server.crt
key = eg/ssl-proxy/server.key

; Enable PROXY Protocol v2 to backend
; Sends client IP, destination port, and SSL connection info
protocol = proxy
