Skip to content

Commit

Permalink
Log remote address of failed conn
Browse files Browse the repository at this point in the history
  • Loading branch information
riobard committed Aug 19, 2020
1 parent 67ba6d4 commit 60c7f85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 60c7f85

Please sign in to comment.