tun2: add logging calls to client connections
This commit is contained in:
parent
92d23eec09
commit
65f99d052b
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue