From e008402972e58ab99506bbbbf4d540a21f5be465 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 12 Feb 2023 09:26:48 +0100 Subject: [PATCH] DOC: proxy-protocol: fix wrong byte in provided example There was a mistake in the example of proxy-proto frame provided, it cannot end with 0x02 but only 0x20 or 0x21 since the version is in the upper 4 bits and the lower ones are 0 for LOCAL or 1 for PROXY, hence the example should be: \x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A\x20 Thanks to Bram Grit for reporting this mistake. --- doc/proxy-protocol.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/proxy-protocol.txt b/doc/proxy-protocol.txt index 4d49d5cd1..fac033176 100644 --- a/doc/proxy-protocol.txt +++ b/doc/proxy-protocol.txt @@ -500,7 +500,7 @@ protocol. Identifying the protocol version is easy : - if the incoming byte count is 16 or above and the 13 first bytes match the protocol signature block followed by the protocol version 2 : - \x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A\x02 + \x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A\x20 - otherwise, if the incoming byte count is 8 or above, and the 5 first characters match the US-ASCII representation of "PROXY" then the protocol