Stream proxy directives

proxy_protocol directive (stream)

Stream/server context; default off; since 1.9.2. Sends PROXY protocol to upstream, not inbound reception. v2 added in 1.31.4; local OSS 1.26.3 accepts only on/off.

Formal Syntax & Structure

nginx syntaxnginx
proxy_protocol on | off | v2;

Parameters & Attributes

NameTypeDescription
stateon | off | v2 (1.31.4+)Send PROXY metadata upstream. on selects v1; v2 is newer than local 1.26.3. Upstream must understand selected framing.

Working Example

Example Snippetnginx
proxy_protocol on;
Nginx Reference