=true data-repo=istio>$ cat &lt;&lt;EOF &gt; ./sni-proxy.conf
user www-data;

events {
}

stream {
  log_format log_stream &#39;\$remote_addr [\$time_local] \$protocol [\$ssl_preread_server_name]&#39;
  &#39;\$status \$bytes_sent \$bytes_received \$session_time&#39;;

  access_log /var/log/nginx/access.log log_stream;
  error_log  /var/log/nginx/error.log;

  # tcp forward proxy by SNI
  server {
    resolver 8.8.8.8 ipv6=off;
    listen       127.0.0.1:$MONGODB_PORT;
    proxy_pass   \$ssl_preread_server_n