tun2: add logging calls to client connections

This commit is contained in:
Cadey Ratio 2017-03-26 15:13:54 -07:00
parent 92d23eec09
commit 65f99d052b
1 changed files with 5 additions and 0 deletions

View File

@ -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,