I'm struggling from days with the realization of an idea to allow the configuration of a main proxy container that automatically redirect traffic from a port (80 and 443 in my case) to the container with a specific hostname/domain and dedicated SSL Certificate (not Let's encrypt etc.) that resides on final endpoint. The solution i'm looking for should create a "direct tunnel", based on source hostname/domain, to the final containers skipping the needs of an SSL certificate on proxy (passthrough).
I need it to allow multiple services to run on 443 (no i cannot use different ports with forwarding) on same Windows host.
Initially i've found nginx-proxy that automatically create a proxy_pass for each container that resides on current host, but i had some issues to configure it for SSL so i've moved on a pre-configured traefik container that works. However i've not solved the SSL issues since the browser shows that the site is using the traefik.local certificate instead of the real one of final container.
I've read around that i need a transparent/passthrough proxy (or tcp proxy) to accomplish it but i've not found anything that is able to autoconfigure itself such as nginx-proxy. A working example is the following: https://github.com/hpello/tcp-proxy-docker, but doesn't include the nginx-proxy autoconfiguration feature.
I've also found some solution with iptables and redsocks that seems similar to the UCP enterprise docker solution, but, as before, it's not autoconfigured such as nginx-proxy.
I've not found any guide for HAproxy and EnvoyProxy to use automatic transparent proxy / tcp proxy.
So, i would ask you:
Is it possible to create such proxy or am i missing something?
Could someone help me to find a good solution to it?
I've created an opensource project that does everythin I needed on a docker network and also directly on host: