add handler recorder
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
tun_util "github.com/go-gost/x/internal/util/tun"
|
||||
"github.com/go-gost/x/registry"
|
||||
"github.com/songgao/water/waterutil"
|
||||
ctxvalue "github.com/go-gost/x/ctx"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -74,6 +75,7 @@ func (h *tunHandler) Handle(ctx context.Context, conn net.Conn, opts ...handler.
|
||||
log = log.WithFields(map[string]any{
|
||||
"remote": conn.RemoteAddr().String(),
|
||||
"local": conn.LocalAddr().String(),
|
||||
"sid": ctxvalue.SidFromContext(ctx),
|
||||
})
|
||||
|
||||
log.Infof("%s <> %s", conn.RemoteAddr(), conn.LocalAddr())
|
||||
|
||||
Reference in New Issue
Block a user