chore: sync tunnel code

This commit is contained in:
gVisor bot 2022-11-12 21:42:45 +08:00
parent d955c2e016
commit 7f4459150f

View file

@ -3,7 +3,6 @@ package tunnel
import ( import (
"context" "context"
"fmt" "fmt"
P "github.com/Dreamacro/clash/component/process"
"net" "net"
"net/netip" "net/netip"
"path/filepath" "path/filepath"
@ -14,6 +13,7 @@ import (
"github.com/Dreamacro/clash/adapter/inbound" "github.com/Dreamacro/clash/adapter/inbound"
"github.com/Dreamacro/clash/component/nat" "github.com/Dreamacro/clash/component/nat"
P "github.com/Dreamacro/clash/component/process"
"github.com/Dreamacro/clash/component/resolver" "github.com/Dreamacro/clash/component/resolver"
"github.com/Dreamacro/clash/component/sniffer" "github.com/Dreamacro/clash/component/sniffer"
C "github.com/Dreamacro/clash/constant" C "github.com/Dreamacro/clash/constant"
@ -365,7 +365,7 @@ func handleTCPConn(connCtx C.ConnContext) {
err.Error(), err.Error(),
) )
} else { } else {
log.Warnln("[TCP] dial %s (match %s(%s)) to %s error: %s", proxy.Name(), rule.RuleType().String(), rule.Payload(), metadata.RemoteAddress(), err.Error()) log.Warnln("[TCP] dial %s (match %s/%s) %s --> %s error: %s", proxy.Name(), rule.RuleType().String(), rule.Payload(), metadata.SourceAddress(), metadata.RemoteAddress(), err.Error())
} }
return return
} }