Enum Class ProxyProtocolMode

java.lang.Object
java.lang.Enum<ProxyProtocolMode>
io.kroxylicious.proxy.config.ProxyProtocolMode
All Implemented Interfaces:
Serializable, Comparable<ProxyProtocolMode>, Constable

public enum ProxyProtocolMode extends Enum<ProxyProtocolMode>
Controls how Kroxylicious handles HaProxy PROXY protocol headers on incoming connections.
See Also:
  • Enum Constant Details

    • REQUIRED

      public static final ProxyProtocolMode REQUIRED
      Every incoming connection must begin with a valid PROXY protocol header (v1 or v2). Connections that do not send a PROXY header will be rejected with a clear error.
    • ALLOWED

      public static final ProxyProtocolMode ALLOWED
      Kroxylicious inspects the first bytes of each connection and automatically detects whether a PROXY protocol header is present. If the bytes match a valid v1 or v2 signature the header is decoded and the original client address is extracted; otherwise the bytes are passed through to the Kafka protocol decoder as-is.

      This mode is useful when the same listener may receive both proxied and direct connections.

    • DISABLED

      public static final ProxyProtocolMode DISABLED
      No PROXY protocol handling. All bytes are treated as Kafka protocol data. This is the default when no proxyProtocol block is configured.
  • Method Details

    • values

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

      public static ProxyProtocolMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null