mirror of
https://github.com/lwch/natpass
synced 2025-10-08 06:30:02 +08:00
增加log
This commit is contained in:
@@ -132,7 +132,7 @@ func (h *Handler) readHandshake(c *network.Conn) (string, error) {
|
||||
}
|
||||
|
||||
// onMessage forward message
|
||||
func (h *Handler) onMessage(msg *network.Msg) {
|
||||
func (h *Handler) onMessage(conn *network.Conn, msg *network.Msg) {
|
||||
if msg.GetXType() == network.Msg_keepalive {
|
||||
return
|
||||
}
|
||||
@@ -153,6 +153,7 @@ func (h *Handler) onMessage(msg *network.Msg) {
|
||||
logging.Error("client %s not found", to)
|
||||
return
|
||||
}
|
||||
logging.Info("link: %s, to: %s, conn: %s, cli: %s, type: %s", linkID, to, conn.RemoteAddr().String(), cli.id, msg.GetXType().String())
|
||||
h.msgHook(msg, cli)
|
||||
cli.writeMessage(msg)
|
||||
}
|
||||
|
Reference in New Issue
Block a user