From 60c7f85e29f242483c5bb394588fe62f57efb014 Mon Sep 17 00:00:00 2001 From: Riobard Date: Wed, 19 Aug 2020 12:31:14 +0800 Subject: [PATCH] Log remote address of failed conn --- tcp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp.go b/tcp.go index 4919ecb0..1512acb1 100644 --- a/tcp.go +++ b/tcp.go @@ -119,7 +119,7 @@ func tcpRemote(addr string, shadow func(net.Conn) net.Conn) { tgt, err := socks.ReadAddr(sc) if err != nil { - logf("failed to get target address: %v", err) + logf("failed to get target address from %v: %v", c.RemoteAddr(), err) // drain c to avoid leaking server behavioral features // see https://www.ndss-symposium.org/ndss-paper/detecting-probe-resistant-proxies/ _, err = io.Copy(ioutil.Discard, c)