add observer

This commit is contained in:
ginuerzh
2024-01-03 20:55:06 +08:00
parent e1ae379048
commit c959fc2f73
95 changed files with 2371 additions and 890 deletions

View File

@ -13,6 +13,7 @@ import (
limiter "github.com/go-gost/x/limiter/traffic/wrapper"
metrics "github.com/go-gost/x/metrics/wrapper"
"github.com/go-gost/x/registry"
stats "github.com/go-gost/x/stats/wrapper"
"github.com/quic-go/quic-go"
)
@ -102,6 +103,7 @@ func (l *quicListener) 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: