1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-28 14:50:26 +08:00

feat: full packet xor

This commit is contained in:
源文雨
2023-08-04 13:00:36 +08:00
parent 37bf73c3dd
commit f474381db8
6 changed files with 39 additions and 1 deletions

View File

@@ -99,7 +99,7 @@ func (l *Link) write(p *head.Packet, teatype uint8, additional, mtu uint16, data
return 0, errors.New("[send] nil endpoint of " + p.Dst.String())
}
logrus.Debugln("[send] write", len(d), "bytes data from ep", l.me.myep.LocalAddr(), "to", peerep, "offset:", fmt.Sprintf("%04x", offset))
n, err = l.me.myep.WriteToUDP(d, peerep)
n, err = l.me.myep.WriteToUDP(l.me.xor(d), peerep)
cl()
}
return