fabiolb / fabio

Consul Load-Balancing made simple
https://fabiolb.net
MIT License
7.25k stars 619 forks source link

Add support for HTTPS+TCP+SNI on the same listener #783

Closed nathanejohnson closed 4 years ago

nathanejohnson commented 4 years ago

In some cases it is desirable to have TCP SNI steering as well as HTTPS proxying.

For example: Say you have one external IP address, 1.2.3.4

You have a services A, B and C that need path based (https) routing

You have service D that needs to see the client certificate, and any traffic with this SNI should be routed to D so it can terminate TLS

Adding a https+tcp+sni mode would support this use case by allowing any hosts that match D - as specified by proto=tcp or scheme is tcp:// in the route - would be tcp proxied, and that everything else would fall through to existing HTTPS routing logic.