add observer
This commit is contained in:
@ -17,6 +17,7 @@ import (
|
||||
md "github.com/go-gost/core/metadata"
|
||||
metrics "github.com/go-gost/x/metrics/wrapper"
|
||||
"github.com/go-gost/x/registry"
|
||||
stats "github.com/go-gost/x/stats/wrapper"
|
||||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
@ -117,6 +118,7 @@ func (l *dnsListener) Accept() (conn net.Conn, err error) {
|
||||
select {
|
||||
case conn = <-l.cqueue:
|
||||
conn = metrics.WrapConn(l.options.Service, conn)
|
||||
conn = stats.WrapConn(conn, l.options.Stats)
|
||||
conn = admission.WrapConn(l.options.Admission, conn)
|
||||
conn = limiter.WrapConn(l.options.TrafficLimiter, conn)
|
||||
case err, ok = <-l.errChan:
|
||||
|
Reference in New Issue
Block a user