diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index e6a274b0..8678d47c 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -218,7 +218,7 @@ func handleUDPConn(packet *inbound.PacketAdapter) { rawPc, err := proxy.DialUDP(metadata) if err != nil { - log.Warnln("[UDP] dial %s error: %s", proxy.Name(), err.Error()) + log.Warnln("[UDP] dial %s to %s error: %s", proxy.Name(), metadata.String(), err.Error()) return } pc := newUDPTracker(rawPc, DefaultManager, metadata, rule) @@ -257,13 +257,13 @@ func handleTCPConn(localConn C.ServerAdapter) { proxy, rule, err := resolveMetadata(metadata) if err != nil { - log.Warnln("Parse metadata failed: %v", err) + log.Warnln("[Metadata] parse failed: %s", err.Error()) return } remoteConn, err := proxy.Dial(metadata) if err != nil { - log.Warnln("dial %s error: %s", proxy.Name(), err.Error()) + log.Warnln("dial %s to %s error: %s", proxy.Name(), metadata.String(), err.Error()) return } remoteConn = newTCPTracker(remoteConn, DefaultManager, metadata, rule)