Skip to content

Commit 120dfa2

Browse files
committed
Use math/rand and remove unsupported extension
1 parent 35ae535 commit 120dfa2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pkg/randomize/extension.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ func RandomizeExtensionUnmarshal(buf []byte) ([]Extension, error) {
9090
err = unmarshalAndAppend(buf[offset:], &extension.UseExtendedMasterSecret{})
9191
case RenegotiationInfoTypeValue:
9292
err = unmarshalAndAppend(buf[offset:], &extension.RenegotiationInfo{})
93-
case ConnectionIDTypeValue:
94-
err = unmarshalAndAppend(buf[offset:], &extension.ConnectionID{})
9593
default:
9694
}
9795
if err != nil {

pkg/randomize/util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package randomize
22

33
import (
4-
"math/rand/v2"
4+
"math/rand"
55
)
66

77
// nolint:typecheck
88
func randRange(min, max int) int {
9-
return rand.IntN(max-min) + min
9+
return rand.Intn(max-min) + min
1010
}
1111

1212
var ALPNS = []string{"http/1.0", "http/1.1", "h2c", "h2", "h3", "stun.turn", "webrtc", "c-webrtc", "ftp", "pop3", "imap", "mqtt", "smb", "irc", "sip/2"}

0 commit comments

Comments
 (0)