Skip to content

Commit

Permalink
update parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
markpash committed Feb 20, 2025
1 parent a49dbf1 commit 0480583
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ipscanner/internal/ping/warp.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func initiateHandshake(ctx context.Context, serverAddr netip.AddrPort, privateKe
}
defer conn.Close()

numPackets := randomInt(8, 15)
numPackets := randomInt(20, 50)
randomPacket := make([]byte, 100)
for i := uint64(0); i < numPackets; i++ {
select {
Expand All @@ -232,7 +232,7 @@ func initiateHandshake(ctx context.Context, serverAddr netip.AddrPort, privateKe
return 0, fmt.Errorf("error sending random packet: %w", err)
}

time.Sleep(time.Duration(randomInt(20, 250)) * time.Millisecond)
time.Sleep(time.Duration(randomInt(80, 150)) * time.Millisecond)
}
}

Expand Down
4 changes: 2 additions & 2 deletions wireguard/device/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (peer *Peer) sendRandomPackets() {
return
}

numPackets := randomInt(15, 50)
numPackets := randomInt(20, 50)
maxpLen := uint64(len(Wheader) + 120)
randomPacket := make([]byte, maxpLen)
for i := uint64(0); i < numPackets; i++ {
Expand All @@ -141,7 +141,7 @@ func (peer *Peer) sendRandomPackets() {
return
}

time.Sleep(time.Duration(randomInt(20, 250)) * time.Millisecond)
time.Sleep(time.Duration(randomInt(80, 150)) * time.Millisecond)
}
}

Expand Down

0 comments on commit 0480583

Please sign in to comment.