-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
proxy_protocol.proto
50 lines (38 loc) · 1.65 KB
/
proxy_protocol.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
syntax = "proto3";
package envoy.config.core.v3;
import "udpa/annotations/status.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.config.core.v3";
option java_outer_classname = "ProxyProtocolProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Proxy protocol]
message ProxyProtocolPassThroughTLVs {
enum PassTLVsMatchType {
// Pass all TLVs.
INCLUDE_ALL = 0;
// Pass specific TLVs defined in tlv_type.
INCLUDE = 1;
}
// The strategy to pass through TLVs. Default is INCLUDE_ALL.
// If INCLUDE_ALL is set, all TLVs will be passed through no matter the tlv_type field.
PassTLVsMatchType match_type = 1;
// The TLV types that are applied based on match_type.
// TLV type is defined as uint8_t in proxy protocol. See `the spec
// <https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt>`_ for details.
repeated uint32 tlv_type = 2 [(validate.rules).repeated = {items {uint32 {lt: 256}}}];
}
message ProxyProtocolConfig {
enum Version {
// PROXY protocol version 1. Human readable format.
V1 = 0;
// PROXY protocol version 2. Binary format.
V2 = 1;
}
// The PROXY protocol version to use. See https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt for details
Version version = 1;
// This config controls which TLVs can be passed to upstream if it is Proxy Protocol
// V2 header. If there is no setting for this field, no TLVs will be passed through.
ProxyProtocolPassThroughTLVs pass_through_tlvs = 2;
}