diff --git a/proxy_protocol.go b/proxy_protocol.go index 9c1b2b6..ef3bf0a 100644 --- a/proxy_protocol.go +++ b/proxy_protocol.go @@ -18,6 +18,11 @@ type protoConn struct { proxy *proxyproto.Header } +// New create a wrapped listener +func New(l net.Listener) net.Listener { + return &protoListener{l} +} + func (l *protoListener) Accept() (net.Conn, error) { c, err := l.Listener.Accept() if err != nil {