Package io.kroxylicious.proxy.config
Enum Class ProxyProtocolMode
- All Implemented Interfaces:
Serializable,Comparable<ProxyProtocolMode>,Constable
Controls how Kroxylicious handles HaProxy PROXY protocol headers on incoming connections.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic ProxyProtocolModeReturns the enum constant of this class with the specified name.static ProxyProtocolMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
No PROXY protocol handling. All bytes are treated as Kafka protocol data. This is the default when noproxyProtocolblock is configured.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-