java.lang.Object
java.lang.Enum<UpstreamConnectMode>
io.envoyproxy.envoy.extensions.filters.network.tcp_proxy.v3.UpstreamConnectMode
All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<UpstreamConnectMode>, java.lang.constant.Constable

public enum UpstreamConnectMode extends Enum<UpstreamConnectMode> implements com.google.protobuf.ProtocolMessageEnum
 Specifies when the TCP proxy establishes the upstream connection.
 
Protobuf enum envoy.extensions.filters.network.tcp_proxy.v3.UpstreamConnectMode
  • Enum Constant Details

    • IMMEDIATE

      public static final UpstreamConnectMode IMMEDIATE
       Establish the upstream connection immediately when the downstream connection is accepted.
       This is the default behavior and provides the lowest latency.
       
      IMMEDIATE = 0;
    • ON_DOWNSTREAM_DATA

      public static final UpstreamConnectMode ON_DOWNSTREAM_DATA
       Wait for initial data from the downstream connection before establishing the upstream connection.
       This allows preceding filters to inspect the initial data (e.g., extracting SNI from TLS ClientHello)
       before the upstream connection is established.
      
       This mode requires ``max_early_data_bytes`` to be set.
      
       .. warning::
         This mode is not suitable for server-first protocols (e.g., SMTP, MySQL, POP3) where the
         server sends the initial greeting. For such protocols, use ``IMMEDIATE`` mode.
       
      ON_DOWNSTREAM_DATA = 1;
    • ON_DOWNSTREAM_TLS_HANDSHAKE

      public static final UpstreamConnectMode ON_DOWNSTREAM_TLS_HANDSHAKE
       Wait for the downstream TLS handshake to complete before establishing the upstream connection.
       This allows access to the full TLS connection information, including client certificates
       and negotiated parameters, which can be used for routing decisions or passed as metadata
       to the upstream.
      
       .. note::
         This mode is only effective when the downstream connection uses TLS. For non-TLS
         connections, it behaves the same as ``IMMEDIATE``.
       
      ON_DOWNSTREAM_TLS_HANDSHAKE = 2;
    • UNRECOGNIZED

      public static final UpstreamConnectMode UNRECOGNIZED
  • Field Details

    • IMMEDIATE_VALUE

      public static final int IMMEDIATE_VALUE
       Establish the upstream connection immediately when the downstream connection is accepted.
       This is the default behavior and provides the lowest latency.
       
      IMMEDIATE = 0;
      See Also:
    • ON_DOWNSTREAM_DATA_VALUE

      public static final int ON_DOWNSTREAM_DATA_VALUE
       Wait for initial data from the downstream connection before establishing the upstream connection.
       This allows preceding filters to inspect the initial data (e.g., extracting SNI from TLS ClientHello)
       before the upstream connection is established.
      
       This mode requires ``max_early_data_bytes`` to be set.
      
       .. warning::
         This mode is not suitable for server-first protocols (e.g., SMTP, MySQL, POP3) where the
         server sends the initial greeting. For such protocols, use ``IMMEDIATE`` mode.
       
      ON_DOWNSTREAM_DATA = 1;
      See Also:
    • ON_DOWNSTREAM_TLS_HANDSHAKE_VALUE

      public static final int ON_DOWNSTREAM_TLS_HANDSHAKE_VALUE
       Wait for the downstream TLS handshake to complete before establishing the upstream connection.
       This allows access to the full TLS connection information, including client certificates
       and negotiated parameters, which can be used for routing decisions or passed as metadata
       to the upstream.
      
       .. note::
         This mode is only effective when the downstream connection uses TLS. For non-TLS
         connections, it behaves the same as ``IMMEDIATE``.
       
      ON_DOWNSTREAM_TLS_HANDSHAKE = 2;
      See Also:
  • Method Details

    • values

      public static UpstreamConnectMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static UpstreamConnectMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static UpstreamConnectMode valueOf(int value)
      Deprecated.
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      value - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • forNumber

      public static UpstreamConnectMode forNumber(int value)
      Parameters:
      value - The numeric wire value of the corresponding enum entry.
      Returns:
      The enum associated with the given numeric wire value.
    • internalGetValueMap

      public static com.google.protobuf.Internal.EnumLiteMap<UpstreamConnectMode> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      public static UpstreamConnectMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      desc - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null