目录
update-envoy[bot]

http: Support inferring X-Forwarded-Proto from PROXY protocol destination port (#43088)

When using Layer 4 load balancers (like AWS NLB) that terminate TLS and forward traffic using PROXY protocol, Envoy receives unencrypted traffic but needs to know the original protocol for correct redirect behavior.

This change adds a new HCM configuration option forwarded_proto_config that allows specifying which PROXY protocol destination ports should be treated as HTTPS or HTTP. When enabled and the local address was restored from PROXY protocol, the x-forwarded-proto header is set based on whether the destination port is in https_destination_ports or http_destination_ports.

Example configuration:

http_connection_manager:
  forwarded_proto_config:
    https_destination_ports: [443, 8443]
    http_destination_ports: [80, 8080]

Risk Level: Low - opt-in feature that only activates when explicitly configured and when localAddressRestored() is true Testing: Added 6 unit tests in conn_manager_utility_test.cc covering port 443/80 mapping, unmapped ports, empty config, non-restored address, and custom ports Docs Changes: N/A Release Notes: Added Platform Specific Features: [Optional Runtime guard:] Fixes #43031 [Optional Fixes commit #PR or SHA] [Optional Deprecated:] API Considerations: Added new message ForwardedProtoConfig and field forwarded_proto_config (#61) to HttpConnectionManager. The configuration uses two repeated uint32 fields (https_destination_ports and http_destination_ports) for type-safe port specification without requiring string validation.


Signed-off-by: Prashanth Josyula prashanth.16@gmail.com

Mirrored from https://github.com/envoyproxy/envoy @ f126920c1c3443175680bdc88c55116b979d396f

3个月前3425次提交

Data plane API

This tree hosts the configuration and APIs that drive Envoy. The APIs are also in some cases used by other proxy solutions that aim to interoperate with management systems and configuration generators that are built against this standard. Thus, we consider these a set of universal data plane APIs. See this blog post for more information on the universal data plane concept.

Repository structure

The API tree can be found at two locations:

Further API reading

邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号