chore: better tproxy error logging

This commit is contained in:
wwqgtxx 2023-05-11 21:31:29 +08:00
parent 8dd7632d0a
commit 534282839c

View File

@ -78,7 +78,7 @@ func createOrGetLocalConn(rAddr, lAddr net.Addr, in chan<- C.PacketAdapter, natT
}()
conn, err := listenLocalConn(rAddr, lAddr, in, natTable)
if err != nil {
log.Errorln("listenLocalConn failed with error: %s, packet loss", err.Error())
log.Errorln("listenLocalConn failed with error: %s, packet loss (rAddr[%T]=%s lAddr[%T]=%s)", err.Error(), rAddr, remote, lAddr, local)
return nil, err
}
natTable.AddLocalConn(local, remote, conn)