commit bdb61ded87442d30f124e26effef8feede8ebb53
parent 39b27c5d1587742ae027a194d09a22102dc92e50
Author: parazyd <parazyd@dyne.org>
Date: Tue, 9 Jul 2019 19:05:06 +0200
If verbose, also report when connections are closed.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/tlstun.go b/tlstun.go
@@ -92,6 +92,9 @@ func tunnel(conn net.Conn) {
io.Copy(client, conn)
}()
go func() {
+ if *verbose {
+ defer log.Printf("Closed connection from %s\n", conn.RemoteAddr())
+ }
defer client.Close()
defer conn.Close()
io.Copy(conn, client)