Skip to content

Commit

Permalink
Use math/rand and remove unsupported extension
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorsm committed Jun 20, 2024
1 parent 35ae535 commit 120dfa2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions pkg/randomize/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ func RandomizeExtensionUnmarshal(buf []byte) ([]Extension, error) {
err = unmarshalAndAppend(buf[offset:], &extension.UseExtendedMasterSecret{})
case RenegotiationInfoTypeValue:
err = unmarshalAndAppend(buf[offset:], &extension.RenegotiationInfo{})
case ConnectionIDTypeValue:
err = unmarshalAndAppend(buf[offset:], &extension.ConnectionID{})
default:
}
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/randomize/util.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package randomize

import (
"math/rand/v2"
"math/rand"
)

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

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"}
Expand Down

0 comments on commit 120dfa2

Please sign in to comment.