add bind for relay

This commit is contained in:
ginuerzh
2021-11-23 23:23:16 +08:00
parent 7beb5bf6d7
commit 98ef6c7492
18 changed files with 391 additions and 201 deletions

View File

@ -2,6 +2,7 @@ package relay
import (
"context"
"fmt"
"net"
"time"
@ -17,7 +18,7 @@ func (h *relayHandler) handleForward(ctx context.Context, conn net.Conn, network
}
h.logger = h.logger.WithFields(map[string]interface{}{
"dst": target.Addr(),
"dst": fmt.Sprintf("%s/%s", target.Addr(), network),
})
h.logger.Infof("%s >> %s", conn.RemoteAddr(), target.Addr())