Skip to content

Commit

Permalink
Merge pull request #17 from benbuzbee/benbuz/log-guest-src
Browse files Browse the repository at this point in the history
Log the src the guest will see
  • Loading branch information
majek committed Jul 9, 2020
2 parents 56f6c95 + 5ed9e8e commit 2b30714
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fwd.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ func LocalForward(state *State, s *stack.Stack, host KaConn, gaddr net.Addr, buf
// original IP.
}
}

if srcIP != nil {
// It's very nice the proxy-protocol (or just
// client) gave us client port number, but we
Expand Down Expand Up @@ -209,11 +208,12 @@ func LocalForward(state *State, s *stack.Stack, host KaConn, gaddr net.Addr, buf
pe = connSplice(host, guest, sppHeader)
}
if logConnections {
fmt.Printf("[-] %s://%s/%s/%s local-fwd %sdone: %s\n",
fmt.Printf("[-] %s://%s/%s/%s (guest-src:%s) local-fwd %sdone: %s\n",
gaddr.Network(),
raddr,
host.LocalAddr(),
gaddr.String(),
guest.LocalAddr(),
ppPrefix,
pe)
}
Expand Down

0 comments on commit 2b30714

Please sign in to comment.