reverseproxy: Dynamic ServerName for TLS upstreams (#4836)
reverseproxy: Dynamic ServerName for TLS upstreams (#4836)

* Make reverse proxy TLS server name replaceable for SNI upstreams.

* Reverted previous TLS server name replacement, and implemented thread safe version.

* Move TLS servername replacement into it's own function

* Moved SNI servername replacement into httptransport.

* Solve issue when dynamic upstreams use wrong protocol upstream.

* Revert previous commit.

Old commit was: Solve issue when dynamic upstreams use wrong protocol upstream.
Id: 3c9806ccb63e66bdcac8e1ed4520c9d135cb011d

Co-authored-by: Matt Holt <6e15340bc34d98c823445cca0475cc9127379d4b@users.noreply.github.com>
mholt/caddy,l3dlp/caddy,l3dlp/caddy,mholt/caddy,l3dlp/caddy