A Go library implementation of the PROXY protocol, versions 1 and 2.
Full Changelog: https://github.com/pires/go-proxyproto/compare/v0.6.2...v0.7.0
SetDeadline
(#87) thanks to @mschneider82 for the fixNone
The two bugs addressed below are considered serious security issues that can lead to DoS. I cannot express how thankful I am for @isedev for sharing the problem and the solution <3
PP2_TYPE_UNIQUE_ID
(#67) thanks to @TimWollaReadFrom
/WriteTo
to increase performance when proxying wrapped connections using io.Copy
(#68) thanks to @databus23First, the master
branch has been renamed to main
. Assuming your local copy has this repo as remote origin
, execute the following commands:
git branch -m master main
git fetch origin
Optionally, if you're tracking this instead of a fork:
git branch -u origin/main main
ErrCantReadProtocolVersionAndCommand
with:
ErrLineMustEndWithCrlf
when the issue is the line doesn't end with \r\n
, which is required as per spec, andErrCantReadAddressFamilyAndProtocol
when inet family and transport protocol are not TCP4
, TCP6
or UNKNOWN
, as per spec.
Also, if not UNKNOWN
, addresses information is required.PROXY UNKNOWN
(#61)
This has been quietly introduced in the spec while we were not watching.UNSPEC
but only when command is LOCAL
(#61)
For more information, read #60. Thank you to @bohanyang for the detailed description.