Skip to content

Instantly share code, notes, and snippets.

@lifeblood
Forked from zukka77/haproxy.cfg
Created October 10, 2023 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lifeblood/28274646f360ca5b4ca138c2c9ba2533 to your computer and use it in GitHub Desktop.
Save lifeblood/28274646f360ca5b4ca138c2c9ba2533 to your computer and use it in GitHub Desktop.
frontend ssl
mode tcp
bind 0.0.0.0:443 name frontend-ssl
option tcplog
log global
tcp-request inspect-delay 3s
tcp-request content accept if { req.ssl_hello_type 1 }
use_backend main-ssl if { req.ssl_hello_type 1 }
use_backend ssh if !{ req.ssl_hello_type 1 } { payload(0,7) -m bin 5353482d322e30 }
use_backend openvpn if !{ req.ssl_hello_type 1 } !{ req.len 0 }
use_backend ssh if !{ req.ssl_hello_type 1 } { req.len 0 }
backend main-ssl
mode tcp
server main-ssl 127.0.0.1:8443
backend openvpn
mode tcp
server openvpn-localhost 127.0.0.1:1194
backend ssh
mode tcp
server ssh-localhost 127.0.0.1:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment