Class XffConfig
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.extensions.http.original_ip_detection.xff.v3.XffConfig
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,XffConfigOrBuilder,Serializable
public final class XffConfig
extends com.google.protobuf.GeneratedMessageV3
implements XffConfigOrBuilder
This extension allows for the original downstream remote IP to be detected by reading the :ref:`config_http_conn_man_headers_x-forwarded-for` header. [#extension: envoy.http.original_ip_detection.xff]Protobuf type
envoy.extensions.http.original_ip_detection.xff.v3.XffConfig- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThis extension allows for the original downstream remote IP to be detected by reading the :ref:`config_http_conn_man_headers_x-forwarded-for` header.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic XffConfigstatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Parser<XffConfig>intcom.google.protobuf.BoolValueIf set, Envoy will not append the remote address to the :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header. .. attention:: For proper proxy behaviour it is not recommended to set this option.com.google.protobuf.BoolValueOrBuilderIf set, Envoy will not append the remote address to the :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header. .. attention:: For proper proxy behaviour it is not recommended to set this option.intThe number of additional ingress proxy hops from the right side of the :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header to trust when determining the origin client's IP address.The `CIDR <https://tools.ietf.org/html/rfc4632>`_ ranges to trust when evaluating the remote IP address to determine the original client's IP address.The `CIDR <https://tools.ietf.org/html/rfc4632>`_ ranges to trust when evaluating the remote IP address to determine the original client's IP address.inthashCode()booleanIf set, Envoy will not append the remote address to the :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header. .. attention:: For proper proxy behaviour it is not recommended to set this option.booleanThe `CIDR <https://tools.ietf.org/html/rfc4632>`_ ranges to trust when evaluating the remote IP address to determine the original client's IP address.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic XffConfig.Builderstatic XffConfig.BuildernewBuilder(XffConfig prototype) protected XffConfig.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static XffConfigparseDelimitedFrom(InputStream input) static XffConfigparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static XffConfigparseFrom(byte[] data) static XffConfigparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static XffConfigparseFrom(com.google.protobuf.ByteString data) static XffConfigparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static XffConfigparseFrom(com.google.protobuf.CodedInputStream input) static XffConfigparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static XffConfigparseFrom(InputStream input) static XffConfigparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static XffConfigparseFrom(ByteBuffer data) static XffConfigparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<XffConfig>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
XFF_NUM_TRUSTED_HOPS_FIELD_NUMBER
public static final int XFF_NUM_TRUSTED_HOPS_FIELD_NUMBER- See Also:
-
XFF_TRUSTED_CIDRS_FIELD_NUMBER
public static final int XFF_TRUSTED_CIDRS_FIELD_NUMBER- See Also:
-
SKIP_XFF_APPEND_FIELD_NUMBER
public static final int SKIP_XFF_APPEND_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getXffNumTrustedHops
public int getXffNumTrustedHops()The number of additional ingress proxy hops from the right side of the :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header to trust when determining the origin client's IP address. The default is zero if this option is not specified. See the documentation for :ref:`config_http_conn_man_headers_x-forwarded-for` for more information. Only one of ``xff_num_trusted_hops`` and ``xff_trusted_cidrs`` can be set.
uint32 xff_num_trusted_hops = 1;- Specified by:
getXffNumTrustedHopsin interfaceXffConfigOrBuilder- Returns:
- The xffNumTrustedHops.
-
hasXffTrustedCidrs
public boolean hasXffTrustedCidrs()The `CIDR <https://tools.ietf.org/html/rfc4632>`_ ranges to trust when evaluating the remote IP address to determine the original client's IP address. This is used instead of :ref:`use_remote_address <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address>`. When the remote IP address matches a trusted CIDR and the :ref:`config_http_conn_man_headers_x-forwarded-for` header was sent, each entry in the ``x-forwarded-for`` header is evaluated from right to left and the first non-trusted address is used as the original client address. If all addresses in ``x-forwarded-for`` are within the trusted list, the first (leftmost) entry is used. .. warning:: Starting with Envoy v1.33.0, private IP address ranges are **not** automatically skipped when determining the original client address. We'll return the first address that is not in the ``xff_trusted_cidrs`` list, even if it is a private IP address. If you want to skip private IP addresses, explicitly add them to the ``xff_trusted_cidrs`` list. For example: .. code-block:: yaml xff_trusted_cidrs: cidrs: - address_prefix: "10.0.0.0" prefix_len: 8 - address_prefix: "172.16.0.0" prefix_len: 12 - address_prefix: "192.168.0.0" prefix_len: 16 - address_prefix: "127.0.0.0" prefix_len: 8 - address_prefix: "fc00::" prefix_len: 7 - address_prefix: "::1" prefix_len: 128 See :ref:`internal_address_config <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.internal_address_config>` for more information about the v1.33.0 behavior change. This is typically used when requests are proxied by a `CDN <https://en.wikipedia.org/wiki/Content_delivery_network>`_. Only one of ``xff_num_trusted_hops`` and ``xff_trusted_cidrs`` can be set..envoy.extensions.http.original_ip_detection.xff.v3.XffTrustedCidrs xff_trusted_cidrs = 2;- Specified by:
hasXffTrustedCidrsin interfaceXffConfigOrBuilder- Returns:
- Whether the xffTrustedCidrs field is set.
-
getXffTrustedCidrs
The `CIDR <https://tools.ietf.org/html/rfc4632>`_ ranges to trust when evaluating the remote IP address to determine the original client's IP address. This is used instead of :ref:`use_remote_address <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address>`. When the remote IP address matches a trusted CIDR and the :ref:`config_http_conn_man_headers_x-forwarded-for` header was sent, each entry in the ``x-forwarded-for`` header is evaluated from right to left and the first non-trusted address is used as the original client address. If all addresses in ``x-forwarded-for`` are within the trusted list, the first (leftmost) entry is used. .. warning:: Starting with Envoy v1.33.0, private IP address ranges are **not** automatically skipped when determining the original client address. We'll return the first address that is not in the ``xff_trusted_cidrs`` list, even if it is a private IP address. If you want to skip private IP addresses, explicitly add them to the ``xff_trusted_cidrs`` list. For example: .. code-block:: yaml xff_trusted_cidrs: cidrs: - address_prefix: "10.0.0.0" prefix_len: 8 - address_prefix: "172.16.0.0" prefix_len: 12 - address_prefix: "192.168.0.0" prefix_len: 16 - address_prefix: "127.0.0.0" prefix_len: 8 - address_prefix: "fc00::" prefix_len: 7 - address_prefix: "::1" prefix_len: 128 See :ref:`internal_address_config <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.internal_address_config>` for more information about the v1.33.0 behavior change. This is typically used when requests are proxied by a `CDN <https://en.wikipedia.org/wiki/Content_delivery_network>`_. Only one of ``xff_num_trusted_hops`` and ``xff_trusted_cidrs`` can be set..envoy.extensions.http.original_ip_detection.xff.v3.XffTrustedCidrs xff_trusted_cidrs = 2;- Specified by:
getXffTrustedCidrsin interfaceXffConfigOrBuilder- Returns:
- The xffTrustedCidrs.
-
getXffTrustedCidrsOrBuilder
The `CIDR <https://tools.ietf.org/html/rfc4632>`_ ranges to trust when evaluating the remote IP address to determine the original client's IP address. This is used instead of :ref:`use_remote_address <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address>`. When the remote IP address matches a trusted CIDR and the :ref:`config_http_conn_man_headers_x-forwarded-for` header was sent, each entry in the ``x-forwarded-for`` header is evaluated from right to left and the first non-trusted address is used as the original client address. If all addresses in ``x-forwarded-for`` are within the trusted list, the first (leftmost) entry is used. .. warning:: Starting with Envoy v1.33.0, private IP address ranges are **not** automatically skipped when determining the original client address. We'll return the first address that is not in the ``xff_trusted_cidrs`` list, even if it is a private IP address. If you want to skip private IP addresses, explicitly add them to the ``xff_trusted_cidrs`` list. For example: .. code-block:: yaml xff_trusted_cidrs: cidrs: - address_prefix: "10.0.0.0" prefix_len: 8 - address_prefix: "172.16.0.0" prefix_len: 12 - address_prefix: "192.168.0.0" prefix_len: 16 - address_prefix: "127.0.0.0" prefix_len: 8 - address_prefix: "fc00::" prefix_len: 7 - address_prefix: "::1" prefix_len: 128 See :ref:`internal_address_config <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.internal_address_config>` for more information about the v1.33.0 behavior change. This is typically used when requests are proxied by a `CDN <https://en.wikipedia.org/wiki/Content_delivery_network>`_. Only one of ``xff_num_trusted_hops`` and ``xff_trusted_cidrs`` can be set..envoy.extensions.http.original_ip_detection.xff.v3.XffTrustedCidrs xff_trusted_cidrs = 2;- Specified by:
getXffTrustedCidrsOrBuilderin interfaceXffConfigOrBuilder
-
hasSkipXffAppend
public boolean hasSkipXffAppend()If set, Envoy will not append the remote address to the :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header. .. attention:: For proper proxy behaviour it is not recommended to set this option. For backwards compatibility, if this option is unset it defaults to true. This only applies when :ref:`use_remote_address <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address>` is false, otherwise :ref:`skip_xff_append <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.skip_xff_append>` applies.
.google.protobuf.BoolValue skip_xff_append = 3;- Specified by:
hasSkipXffAppendin interfaceXffConfigOrBuilder- Returns:
- Whether the skipXffAppend field is set.
-
getSkipXffAppend
public com.google.protobuf.BoolValue getSkipXffAppend()If set, Envoy will not append the remote address to the :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header. .. attention:: For proper proxy behaviour it is not recommended to set this option. For backwards compatibility, if this option is unset it defaults to true. This only applies when :ref:`use_remote_address <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address>` is false, otherwise :ref:`skip_xff_append <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.skip_xff_append>` applies.
.google.protobuf.BoolValue skip_xff_append = 3;- Specified by:
getSkipXffAppendin interfaceXffConfigOrBuilder- Returns:
- The skipXffAppend.
-
getSkipXffAppendOrBuilder
public com.google.protobuf.BoolValueOrBuilder getSkipXffAppendOrBuilder()If set, Envoy will not append the remote address to the :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header. .. attention:: For proper proxy behaviour it is not recommended to set this option. For backwards compatibility, if this option is unset it defaults to true. This only applies when :ref:`use_remote_address <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address>` is false, otherwise :ref:`skip_xff_append <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.skip_xff_append>` applies.
.google.protobuf.BoolValue skip_xff_append = 3;- Specified by:
getSkipXffAppendOrBuilderin interfaceXffConfigOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static XffConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static XffConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static XffConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static XffConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static XffConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static XffConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static XffConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static XffConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static XffConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected XffConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-