add recorder for relay tunnel endpoint

This commit is contained in:
ginuerzh
2023-10-14 21:06:03 +08:00
parent 4be7d60147
commit 5488076801
5 changed files with 25 additions and 9 deletions

View File

@ -222,6 +222,9 @@ func (h *relayHandler) handleBindTunnel(ctx context.Context, conn net.Conn, netw
h.pool.Add(tunnelID, NewConnector(connectorID, session))
log.Debugf("tunnel %s connector %s/%s established", tunnelID, connectorID, network)
if h.recorder.Recorder != nil {
h.recorder.Recorder.Record(ctx, tunnelID[:])
}
return
}