From 65f99d052bd45c597081f86fd0785cac1f3ff040 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sun, 26 Mar 2017 15:13:54 -0700 Subject: [PATCH] tun2: add logging calls to client connections --- lib/tun2/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/tun2/client.go b/lib/tun2/client.go index 6f9eb37..870a72e 100644 --- a/lib/tun2/client.go +++ b/lib/tun2/client.go @@ -4,6 +4,7 @@ import ( "crypto/tls" "encoding/json" "errors" + "log" "net" "net/http" "net/http/httputil" @@ -76,6 +77,8 @@ func (c *Client) connect(serverAddr string) error { } defer conn.Close() + log.Printf("tun2: connected to %s (%v)", conn.RemoteAddr(), c.cfg.ConnType) + session, err := smux.Client(conn, smux.DefaultConfig()) if err != nil { return err @@ -100,6 +103,8 @@ func (c *Client) connect(serverAddr string) error { return err } + log.Println("tun2: client set up and waiting for requests") + err = s.Serve(&smuxListener{ conn: conn, session: session,