add metrics

This commit is contained in:
ginuerzh
2022-04-05 17:56:36 +08:00
parent 6aa1cc7401
commit 1444ebc1ee
26 changed files with 405 additions and 29 deletions

View File

@ -9,9 +9,9 @@ import (
"net"
"time"
"github.com/go-gost/core/common/net/relay"
"github.com/go-gost/core/logger"
"github.com/go-gost/gosocks5"
"github.com/go-gost/x/internal/net/udp"
"github.com/go-gost/x/internal/util/socks"
)
@ -68,7 +68,7 @@ func (h *socks5Handler) handleUDP(ctx context.Context, conn net.Conn, log logger
return err
}
r := relay.NewUDPRelay(socks.UDPConn(cc, h.md.udpBufferSize), pc).
r := udp.NewRelay(socks.UDPConn(cc, h.md.udpBufferSize), pc).
WithBypass(h.options.Bypass).
WithLogger(log)
r.SetBufferSize(h.md.udpBufferSize)