feat(cli): align PROXY Protocol configuration with node_listen and ssl.listen, add IPv6 support#12859
feat(cli): align PROXY Protocol configuration with node_listen and ssl.listen, add IPv6 support#12859twellck wants to merge 6 commits intoapache:masterfrom
Conversation
|
Hi @twellck, For the original problem, we only needed to add IPv6 listening to the template; the current modifications are too complex. |
|
Hi @Baoyuantop, Thank you for the comment! While the proposed approach would indeed address the immediate issue, I believe it treats the symptom rather than the root cause. My current implementation attempts to address the underlying problem by introducing some standardisation to how listeners are managed going forward. Adding IPv6 listening directly to the template would further fragment how listeners ( My proposed solution is fully backward-compatible, based on regression testing, and builds on the established patterns for For now, this PR focuses specifically on standardising I understand that this PR addresses more than the specific issue, but I believe it’s worth considering how we could make Nginx configuration more standardised and maintainable for both developers and deployers of APISIX over time. |
|
Hi @twellck, the scope of changes in this PR far exceeds the requirements outlined in the issue. To maintain code base simplicity and maintainability, we recommend:
|
Description
This pull request aligns the configuration and handling of PROXY Protocol listen ports with the structure used for
node_listenandssl.listen. It adds support for specifying multiple ports and IP addresses (including IPv6), introduces schema validation improvements, ensures backward compatibility with legacy options, and updates documentation.Key Changes:
Configuration and Schema Improvements:
proxy_protocol.listen_httpandproxy_protocol.listen_httpsas new configuration options.proxy_protocol.listen_http_portandproxy_protocol.listen_https_portfields for PROXY Protocol while ensuring backward compatibility.config.yaml.exampleto document the new structure and usage patterns for PROXY Protocol listen options.Backward Compatibility & Warnings:
proxy_protocol.listen_http_portandproxy_protocol.listen_https_portfields, issuing warnings, and internally treats them the same as the new configuration (only when legacy fields are present).Template, Runtime, and IPv6 Support:
ngx_tpl.lua) to uselisten_httpandlisten_httpsfields.listendirectives for IPv6 addresses.Documentation Updates:
listen_http_portandlisten_https_porttolisten_http/listen_https.Testing Enhancements:
proxy_protocol.listen_http_portandproxy_protocol.listen_https_port.listen_httpandlisten_httpsformats, IPv4/IPv6 combinations, and support for QUIC/HTTP3.Which issue(s) this PR fixes:
Fixes #12828
Checklist
Notes for Reviewers
Note: AI helped format this Pull Request.