Enum Class ProxyProtocolDestination

java.lang.Object
java.lang.Enum<ProxyProtocolDestination>
org.microproxy.ProxyProtocolDestination
All Implemented Interfaces:
Serializable, Comparable<ProxyProtocolDestination>, Constable

public enum ProxyProtocolDestination extends Enum<ProxyProtocolDestination>
Which address a PROXY protocol header the proxy sends to a server (HttpProxyServerBootstrap.withSendProxyProtocol(boolean)) names as its destination, when the client's connection did not bring a header of its own (whose destination is passed on as it is). A field of a ProtocolPolicy.
  • Enum Constant Details

    • LOCAL_ADDRESS

      public static final ProxyProtocolDestination LOCAL_ADDRESS
      The address the client connected to: the proxy's end of the client connection (FlowContext.getLocalAddress()), as HAProxy names it. The default.
    • SERVER_ADDRESS

      public static final ProxyProtocolDestination SERVER_ADDRESS
      The remote address of the proxy's connection to the server (or the chained proxy whose tunnel carries the header), and no header at all when that address and the client's are of different address families (IPv4 and IPv6), as LittleProxy does (ProxyToServerConnection.SendProxyProtocolHeader).
  • Method Details

    • values

      public static ProxyProtocolDestination[] 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 ProxyProtocolDestination 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
    • parse

      public static ProxyProtocolDestination parse(String value)
      The value a configuration names: local_address or server_address (any case, - for _).
      Parameters:
      value - the configuration value
      Returns:
      the value it names
      Throws:
      IllegalArgumentException - for any other value