pires / go-proxyproto

A Go library implementation of the PROXY protocol, versions 1 and 2.
Apache License 2.0
478 stars 107 forks source link

Check Local Connection in parseVersion2 #78

Closed bobbybho closed 3 years ago

bobbybho commented 3 years ago

If Connection is LOCAL then we should just skip the rest of the header as per spec. When a sender presents a LOCAL connection, it should not present any address so it sets this field to zero. Receivers MUST always consider this field to skip the appropriate number of bytes and must not assume zero is presented for LOCAL connections.

igor-kupczynski commented 3 years ago

Hey @pires (sorry for the direct ping) any chance this may get reviewed and approved? I understand this is an OSS project and we have no expectation of anything, just want to understand where do we stand with this. We keep our internal private fork and wanted to upstream some fixes and maybe switch back to the upstream.

coveralls commented 3 years ago

Coverage Status

Coverage decreased (-1.08%) to 93.271% when pulling c053a10bcdb764119f87cef196dd70b2e6731193 on bobbybho:local-port-fix into 3aa7ea95a821cf534fae576651e2ca11f222a4e3 on pires:main.

pires commented 3 years ago

Sorry, @igor-kupczynski, for some reason this slipped. Thanks for your contributions and gentle ping!

bobbybho commented 3 years ago

@pires We have finished running integration tests in AWS, GCP and Azure and no error is found in the test result so far. As a result, I am going to close this PR since the latest upstream implementation is working with those cloud providers and we don't need to change the local connection behaviours. Thank you again for reviewing our PR and sharing your feedback with us.

pires commented 3 years ago

Terrific! Thank you very much for your contributions and keeping me posted.