SSL Passthrough with haproxy

Don't want to terminate your SSL connections on the haproxy server? Just do it like this! SSL terminations happen on the respective backend servers. Thanks to a cool feature called SNI

frontend main *:443  
    mode tcp
    acl jenkins req.ssl_sni -i build.staging.foobar.com
    acl artifactory req.ssl_sni -i repo.staging.foobar.com
    tcp-request inspect-delay 2s
    tcp-request content reject if !jenkins !artifactory
    use_backend jenkins_backend if jenkins
    use_backend artifactory_backend if artifactory

backend jenkins_backend  
    mode tcp
    server jenkins 10.0.0.10:443 check

backend artifactory_backend  
    mode tcp
    server artifactory 10.0.0.11:443 check