This commit is contained in:
jdl 2025-08-26 17:01:38 +02:00
parent 302d27692b
commit 1ca55158c2
7 changed files with 4 additions and 24 deletions

View File

@ -1 +0,0 @@
package peer

View File

@ -1,13 +0,0 @@
package peer
/*
func signData(privKey *[64]byte, h header, data, out []byte) []byte {
out = out[:headerSize]
h.Marshal(out)
return sign.Sign(out, data, privKey)
}
func openData(pubKey *[32]byte, signed, out []byte) (data []byte, ok bool) {
return sign.Open(out[:0], signed[headerSize:], pubKey)
}
*/

View File

@ -1 +0,0 @@
package peer

View File

@ -9,9 +9,7 @@ import (
func TestSynPacket(t *testing.T) { func TestSynPacket(t *testing.T) {
p := packetSyn{ p := packetSyn{
TraceID: newTraceID(), TraceID: 2342342345,
//SentAt: time.Now().UnixMilli(),
//SharedKeyType: 1,
Direct: true, Direct: true,
} }
rand.Read(p.SharedKey[:]) rand.Read(p.SharedKey[:])
@ -32,7 +30,7 @@ func TestSynPacket(t *testing.T) {
func TestAckPacket(t *testing.T) { func TestAckPacket(t *testing.T) {
p := packetAck{ p := packetAck{
TraceID: newTraceID(), TraceID: 123213,
ToAddr: netip.AddrPortFrom(netip.AddrFrom4([4]byte{1, 2, 3, 4}), 234), ToAddr: netip.AddrPortFrom(netip.AddrFrom4([4]byte{1, 2, 3, 4}), 234),
} }
@ -52,7 +50,7 @@ func TestAckPacket(t *testing.T) {
func TestProbePacket(t *testing.T) { func TestProbePacket(t *testing.T) {
p := packetProbe{ p := packetProbe{
TraceID: newTraceID(), TraceID: 12345,
} }
buf := p.Marshal(newBuf()) buf := p.Marshal(newBuf())

View File

@ -1 +0,0 @@
package peer

View File

@ -1 +0,0 @@
package peer

View File

@ -1 +0,0 @@
package peer