From 50e3ff8a006100feaa0666cf5e4f9fd5fdcfb721 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Wed, 12 Oct 2022 16:58:16 +0400 Subject: PROXY protocol v2 TLV variables. The variables have prefix $proxy_protocol_tlv_ and are accessible by name and by type. Examples are: $proxy_protocol_tlv_0x01, $proxy_protocol_tlv_alpn. --- src/core/ngx_proxy_protocol.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/ngx_proxy_protocol.h') diff --git a/src/core/ngx_proxy_protocol.h b/src/core/ngx_proxy_protocol.h index b71622094..7d9d3eb70 100644 --- a/src/core/ngx_proxy_protocol.h +++ b/src/core/ngx_proxy_protocol.h @@ -21,6 +21,7 @@ struct ngx_proxy_protocol_s { ngx_str_t dst_addr; in_port_t src_port; in_port_t dst_port; + ngx_str_t tlvs; }; @@ -28,6 +29,8 @@ u_char *ngx_proxy_protocol_read(ngx_connection_t *c, u_char *buf, u_char *last); u_char *ngx_proxy_protocol_write(ngx_connection_t *c, u_char *buf, u_char *last); +ngx_int_t ngx_proxy_protocol_get_tlv(ngx_connection_t *c, ngx_str_t *name, + ngx_str_t *value); #endif /* _NGX_PROXY_PROTOCOL_H_INCLUDED_ */ -- cgit