tun2: log better

This commit is contained in:
Cadey Ratio 2017-03-26 13:23:52 -07:00
parent db3f0af99a
commit 6c162f4ebc
1 changed files with 12 additions and 0 deletions

View File

@ -95,6 +95,12 @@ func (s *Server) ListenAndServe() error {
continue
}
ln.Log(ln.F{
"action": "new_client",
"kcp": false,
"addr": conn.RemoteAddr(),
})
go s.HandleConn(conn, false)
}
}()
@ -118,6 +124,12 @@ func (s *Server) ListenAndServe() error {
ln.Error(err, ln.F{"kind": "kcp", "addr": l.Addr().String()})
}
ln.Log(ln.F{
"action": "new_client",
"kcp": true,
"addr": conn.RemoteAddr(),
})
tc := tls.Server(conn, s.cfg.TLSConfig)
go s.HandleConn(tc, true)