mirror of
https://github.com/coredns/coredns.git
synced 2026-02-13 02:43:10 -05:00
feat(proxyproto): add proxy protocol support (#7738)
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc"
|
||||
"github.com/miekg/dns"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
"github.com/pires/go-proxyproto"
|
||||
"golang.org/x/net/netutil"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/peer"
|
||||
@@ -136,6 +137,9 @@ func (s *ServergRPC) 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