tcp_proxy: support command operators in tunneling_config.hostname (#21067)

Signed-off-by: Jacek Ewertowski jacek.ewertowski1@gmail.com

Commit Message: tcp_proxy: support command operators in tunneling_config.hostname
Additional Description: This change enables dynamically setting tunneling_config.hostname with command operators.
This pull request is an alternative for auto_sni.
This change allows to configure TCP proxy as follows:
```
tunneling_config:
  hostname: %REQUESTED_SERVER_NAME%:443
```
Risk Level: Low
Testing: added unit tests
Docs Changes: done
Release Notes: done
Platform Specific Features: none
Fixes #19612
Fixes #21804

Mirrored from https://github.com/envoyproxy/envoy @ 764a2e9fbb06e2f27fd6775fdc0ed78313b94157
pull/626/head
data-plane-api(Azure Pipelines) 2 years ago
parent aede214359
commit e3ab95bc59
  1. 16
      envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto

@ -69,6 +69,22 @@ message TcpProxy {
"envoy.config.filter.network.tcp_proxy.v2.TcpProxy.TunnelingConfig";
// The hostname to send in the synthesized CONNECT headers to the upstream proxy.
// This field evaluates command operators if set, otherwise returns hostname as is.
//
// Example: dynamically set hostname using downstream SNI
//
// .. code-block:: yaml
//
// tunneling_config:
// hostname: "%REQUESTED_SERVER_NAME%:443"
//
// Example: dynamically set hostname using dynamic metadata
//
// .. code-block: yaml
//
// tunneling_config:
// hostname: "%DYNAMIC_METADATA(tunnel:address)%"
//
string hostname = 1 [(validate.rules).string = {min_len: 1}];
// Use POST method instead of CONNECT method to tunnel the TCP stream.

Loading…
Cancel
Save