mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-11 12:10:26 +08:00
add some logs
This commit is contained in:
@@ -74,10 +74,14 @@ func (m *Me) listen() (conn *net.UDPConn, err error) {
|
|||||||
} else {
|
} else {
|
||||||
logrus.Infoln("[link] drop invalid packet")
|
logrus.Infoln("[link] drop invalid packet")
|
||||||
}
|
}
|
||||||
} else if p.Accept(packet.Dst) && p.allowtrans {
|
} else if p.Accept(packet.Dst) {
|
||||||
// 转发
|
if p.allowtrans {
|
||||||
p.Write(&packet)
|
// 转发
|
||||||
logrus.Infoln("[link] trans packet to", packet.Dst.String()+":"+strconv.Itoa(int(packet.DstPort)))
|
p.Write(&packet)
|
||||||
|
logrus.Infoln("[link] trans packet to", packet.Dst.String()+":"+strconv.Itoa(int(packet.DstPort)))
|
||||||
|
} else {
|
||||||
|
logrus.Warnln("[link] refused to trans packet to", packet.Dst.String()+":"+strconv.Itoa(int(packet.DstPort)))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logrus.Warnln("[link] packet to", packet.Dst, "is refused")
|
logrus.Warnln("[link] packet to", packet.Dst, "is refused")
|
||||||
|
|||||||
Reference in New Issue
Block a user