diff --git a/go.mod b/go.mod index a844df8..6ba07ff 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/pires/go-proxyproto +module github.com/bollenberger/go-proxyproto go 1.24 diff --git a/protocol.go b/protocol.go index 93cf7c4..5c55bb7 100644 --- a/protocol.go +++ b/protocol.go @@ -153,8 +153,8 @@ func (p *Listener) Addr() net.Addr { func NewConn(conn net.Conn, opts ...func(*Conn)) *Conn { // For v1 the header length is at most 108 bytes. // For v2 the header length is at most 52 bytes plus the length of the TLVs. - // We use 256 bytes to be safe. - const bufSize = 256 + // We use 65535, as it's the maximum length representable by a uint16. + const bufSize = 65535 br := bufio.NewReaderSize(conn, bufSize) pConn := &Conn{