Repository: envoyproxy/envoy
File: api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto (Protocol Buffers)

Code before:
  google.protobuf.Duration upstream_idle_timeout = 4;

  // Configuration for :ref:`access logs <arch_overview_access_logs>` emitted by this TCP proxy.
  repeated config.accesslog.v3.AccessLog access_log = 5;

  // The maximum number of unsuccessful connection attempts that will be made before
  // giving up. If the parameter is not specified, 1 connection attempt will be made.
  google.protobuf.UInt32Value max_connect_attempts = 7 [(validate.rules).uint32 = {gte: 1}];

  // Sets the backoff strategy. If not set, the retries are performed without backoff.
  config.core.v3.BackoffStrategy backoff_options = 18;

  // Optional configuration for TCP proxy hash policy. If hash_policy is not set, the hash-based
  // load balancing algorithms will select a host randomly. Currently the number of hash policies is
  // limited to 1.
  repeated type.v3.HashPolicy hash_policy = 11 [(validate.rules).repeated = {max_items: 1}];

  // If set, this configures tunneling, for example configuration options to tunnel TCP payload over
  // HTTP CONNECT. If this message is absent, the payload is proxied upstream as usual.
  // It is possible to dynamically override this configuration and disable tunneling per connection by
  // setting a per-connection filter state object for the key ``envoy.tcp_proxy.disable_tunneling``.
  TunnelingConfig tunneling_config = 12;

  // The maximum duration of a connection. The duration is defined as the period since a connection was
  // established. If not set, there is no maximum duration. When ``max_downstream_connection_duration`` is
  // reached, the connection is closed. The duration must be at least 1ms.
  google.protobuf.Duration max_downstream_connection_duration = 13
      [(validate.rules).duration = {gte {nanos: 1000000}}];

  // Percentage-based jitter for ``max_downstream_connection_duration``. The jitter increases the
  // ``max_downstream_connection_duration`` by a random duration up to the provided percentage.
  // This field is ignored if ``max_downstream_connection_duration`` is not set. If not set, no jitter
  // is added.
  type.v3.Percent max_downstream_connection_duration_jitter_percentage = 20;

  // If both this field and :ref:`access_log_flush_interval
  // <envoy_v3_api_field_extensions.filters.network.tcp_proxy.v3.TcpProxy.TcpAccessLogOptions.access_log_flush_interval>`
  // are specified, the former (deprecated field) is ignored.
  //
  // .. attention::
  //   This field is deprecated in favor of
  //   :ref:`access_log_flush_interval
  //   <envoy_v3_api_field_extensions.filters.network.tcp_proxy.v3.TcpProxy.TcpAccessLogOptions.access_log_flush_interval>`.
  google.protobuf.Duration access_log_flush_interval = 15 [
    deprecated = true,
    (validate.rules).duration = {gte {nanos: 1000000}},
    (envoy.annotations.deprecated_at_minor_version) = "3.0"
  ];

  // If both this field and :ref:`flush_access_log_on_connected
  // <envoy_v3_api_field_extensions.filters.network.tcp_proxy.v3.TcpProxy.TcpAccessLogOptions.flush_access_log_on_connected>`

Review comment (suggestion):
```suggestion
  // reached, the connection is closed. The duration must be at least ``1ms``.
```

Code after:
  google.protobuf.Duration upstream_idle_timeout = 4;

  // Configuration for :ref:`access logs <arch_overview_access_logs>` emitted by this TCP proxy.
  repeated config.accesslog.v3.AccessLog access_log = 5;

  // The maximum number of unsuccessful connection attempts that will be made before
  // giving up. If the parameter is not specified, 1 connection attempt will be made.
  google.protobuf.UInt32Value max_connect_attempts = 7 [(validate.rules).uint32 = {gte: 1}];

  // Sets the backoff strategy. If not set, the retries are performed without backoff.
  config.core.v3.BackoffStrategy backoff_options = 18;

  // Optional configuration for TCP proxy hash policy. If hash_policy is not set, the hash-based
  // load balancing algorithms will select a host randomly. Currently the number of hash policies is
  // limited to 1.
  repeated type.v3.HashPolicy hash_policy = 11 [(validate.rules).repeated = {max_items: 1}];

  // If set, this configures tunneling, for example configuration options to tunnel TCP payload over
  // HTTP CONNECT. If this message is absent, the payload is proxied upstream as usual.
  // It is possible to dynamically override this configuration and disable tunneling per connection by
  // setting a per-connection filter state object for the key ``envoy.tcp_proxy.disable_tunneling``.
  TunnelingConfig tunneling_config = 12;

  // The maximum duration of a connection. The duration is defined as the period since a connection was
  // established. If not set, there is no maximum duration. When ``max_downstream_connection_duration`` is
  // reached, the connection is closed. The duration must be at least ``1ms``.
  google.protobuf.Duration max_downstream_connection_duration = 13
      [(validate.rules).duration = {gte {nanos: 1000000}}];

  // Percentage-based jitter for ``max_downstream_connection_duration``. The jitter increases the
  // ``max_downstream_connection_duration`` by a random duration up to the provided percentage.
  // This field is ignored if ``max_downstream_connection_duration`` is not set. If not set, no jitter
  // is added.
  type.v3.Percent max_downstream_connection_duration_jitter_percentage = 20;

  // If both this field and :ref:`access_log_flush_interval
  // <envoy_v3_api_field_extensions.filters.network.tcp_proxy.v3.TcpProxy.TcpAccessLogOptions.access_log_flush_interval>`
  // are specified, the former (deprecated field) is ignored.
  //
  // .. attention::
  //   This field is deprecated in favor of
  //   :ref:`access_log_flush_interval
  //   <envoy_v3_api_field_extensions.filters.network.tcp_proxy.v3.TcpProxy.TcpAccessLogOptions.access_log_flush_interval>`.
  google.protobuf.Duration access_log_flush_interval = 15 [
    deprecated = true,
    (validate.rules).duration = {gte {nanos: 1000000}},
    (envoy.annotations.deprecated_at_minor_version) = "3.0"
  ];

  // If both this field and :ref:`flush_access_log_on_connected
  // <envoy_v3_api_field_extensions.filters.network.tcp_proxy.v3.TcpProxy.TcpAccessLogOptions.flush_access_log_on_connected>`