relay: use service for rtcp bind handler

This commit is contained in:
ginuerzh
2023-02-04 18:38:21 +08:00
parent c84b4e698c
commit e2d5d50b4b
4 changed files with 157 additions and 109 deletions

View File

@ -10,7 +10,6 @@ import (
"github.com/go-gost/core/logger"
"github.com/go-gost/relay"
netpkg "github.com/go-gost/x/internal/net"
xnet "github.com/go-gost/x/internal/net"
sx "github.com/go-gost/x/internal/util/selector"
)
@ -89,7 +88,7 @@ func (h *relayHandler) handleConnect(ctx context.Context, conn net.Conn, network
t := time.Now()
log.Debugf("%s <-> %s", conn.RemoteAddr(), address)
netpkg.Transport(conn, cc)
xnet.Transport(conn, cc)
log.WithFields(map[string]any{
"duration": time.Since(t),
}).Debugf("%s >-< %s", conn.RemoteAddr(), address)