Hi Todd, On Sat, Apr 19, 2014 at 09:24:50AM -0700, Todd Lyons wrote: > On Thu, Apr 17, 2014 at 9:17 AM, Todd Lyons <[email protected]> wrote: > > > >>> > Note that this probably marks the death of protocol v2 that nobody > >>> > implemented > >>> > yet, but that was supposed to be easier to parse... > >>> Exim git HEAD has support (for the forthcoming 4.83 release) for Proxy > >>> Protocol, when built with EXPERIMENTAL_PROXY. This includes support for > >>> proxy protocols 1 and 2 both. (This is Exim as a server sat behind a > >> supported V2. So actually Exim can probably proudly claim to be the first > >> one to implement v2 :-) > > We can't claim it yet. I recall when I worked on this that I just > > threw in some skeleton code for v2. Yesterday I verified that the v2 > > code does not work, so I'm in the process of fixing it. > > Fixed. Merged to master.
cool! > > Personally I prefer the text based one (PROXYv1), but maybe that just means > > I'm > > a little masochistic. > > I've backed off that position a little. :-) The v2 code to handle > incoming connections is much cleaner and more readable than the v1 > code. But I still like the troubleshooting ability that v1 affords > with a simple packet sniffer and no required mental math. I know what you mean, it's the same for me and for many people, considering the amount of reactions to HTTP/2 being totally binary. But we must be realist : 1 line over 1 billion is parsed by a human, so it's probably acceptable to put the effort on the human for a more reliable and faster computer implementation. > I also wanted to mention that I wrote a perl script > proxy_protocol_client.pl which can be used to test a server for its > Proxy Protocol support (i.e. it emulates the proxy). It exercises > both v1 and v2 (default) with both ipv4 (default) and ipv6 addresses. > If you don't pass any ip:port to send, it uses some default > (hardcoded) source and destination ip:port combinations. It is > interactive with STDIN/STDOUT, so you can pipe some other app to it to > generate the protocol traffic appropriate for the service that the > proxy is handling. I wrote the script for testing Exim with smtp, but > it will work for any other protocol because it does not parse the > content in any way. Personally I found it very useful to test and > diagnose bugs with my Proxy Protocol negotiation code, and hopefully > someone else will too. > > http://git.exim.org/exim.git/blob_plain/eb57651e8badf0b65af0371732e42f2ee5c7772c:/src/util/proxy_protocol_client.pl Oh creat, that can indeed be very useful! Thanks for sharing! Willy

