feat(proxyproto): add proxy protocol support (#7738)

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
Adphi
2026-02-11 02:14:05 +01:00
committed by GitHub
parent a100d0cca4
commit e9c0db32dc
15 changed files with 389 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ import (
"github.com/coredns/coredns/plugin/pkg/transport"
"github.com/miekg/dns"
"github.com/pires/go-proxyproto"
)
// ServerTLS represents an instance of a TLS-over-DNS-server.
@@ -79,6 +80,9 @@ func (s *ServerTLS) 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
}