fabiolb / fabio

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

TCP proxy with SNI support #777

Open bitquest25c opened 4 years ago

bitquest25c commented 4 years ago

Hello,

I have a single server with one Public IP and 10 domains. For each domain I’d like to have a separate docker container as an email server (Postfix + Dovecot). I’d like to achieve this with transparent TCP proxy with SNI support.

I'd like to route traffic from example.com on ports 587 & 143 to one container and traffic for acme.com on ports 587 & 143 to a different container, etc.

Can I achieve this by using host:port? Does anyone know of an example?

Thank you.

shantanugadgil commented 4 years ago

I haven't used Fabio in the recent past, but yes, this should be very much possible. Are the containers registered in Consul? If they are being registered in Consul, the Consul tags should be setup to make the traffic come to each "backend domain".

If not Consul, I think the file backend could be used (but I haven't used the file backend much).

I would like to know too if you are able to solve this.