mirror of
https://github.com/coredns/coredns.git
synced 2026-02-17 12:43:09 -05:00
feat(proxyproto): add proxy protocol support (#7738)
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
"github.com/coredns/coredns/plugin/pkg/reuseport"
|
||||
"github.com/coredns/coredns/plugin/pkg/transport"
|
||||
|
||||
"github.com/pires/go-proxyproto"
|
||||
"golang.org/x/net/netutil"
|
||||
)
|
||||
|
||||
@@ -136,6 +137,9 @@ func (s *ServerHTTPS) Listen() (net.Listener, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if s.connPolicy != nil {
|
||||
l = &proxyproto.Listener{Listener: l, ConnPolicy: s.connPolicy}
|
||||
}
|
||||
return l, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user