1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-07-01 00:00:23 +08:00
This commit is contained in:
源文雨
2023-08-04 16:07:35 +08:00
parent c90cee8c1b
commit 8163c38884
5 changed files with 62 additions and 17 deletions

View File

@@ -2,6 +2,7 @@ package link
import (
"encoding/binary"
"encoding/hex"
"io"
"net"
"strconv"
@@ -99,6 +100,9 @@ func NewMe(cfg *MyConfig) (m Me) {
m.dstport = cfg.DstPort
m.mtu = cfg.MTU & 0xfff8
m.mask = cfg.Mask
var buf [8]byte
binary.BigEndian.PutUint64(buf[:], m.mask)
logrus.Infoln("[me] xor mask", hex.EncodeToString(buf[:]))
if m.writer == nil {
m.writer = helper.SelectWriter()
}