Title: How to detect if server_name is populated for TLS transport protocol
Description:
when defining filter chain matches for listener, is there a way to know specifically that for transport_protocol: tls , server_name is empty or not ?
What i'm trying to do is, if server_name is populated, I want to use REQUESTED_SERVER_NAME for tunnelingConfig else use DOWNSTREAM_LOCAL_ADDRESS .
Unfortunately there are clients that are not setting SNI which is making it difficult to detect this and i'm wondering if anyone has ideas on how to ensure below example gets tunneled using IP instead of SNI ( since SNI will be empty and it is a TLS connection still ).
Title: How to detect if server_name is populated for TLS transport protocol
Description:
when defining filter chain matches for listener, is there a way to know specifically that for
transport_protocol: tls
, server_name is empty or not ?What i'm trying to do is, if server_name is populated, I want to use
REQUESTED_SERVER_NAME
fortunnelingConfig
else useDOWNSTREAM_LOCAL_ADDRESS
.Unfortunately there are clients that are not setting SNI which is making it difficult to detect this and i'm wondering if anyone has ideas on how to ensure below example gets tunneled using IP instead of SNI ( since SNI will be empty and it is a TLS connection still ).
I tried checking against
-
to match against server_name but that doesn't seem to work. Though the access log in tcp_proxy filter is reporting it as-
.