feat: support ip randomize in http header

This commit is contained in:
ckt1031
2023-07-14 21:30:13 +08:00
parent 164df4e708
commit 4043fccedb
6 changed files with 64 additions and 2 deletions

16
common/ip-gen.go Normal file
View File

@@ -0,0 +1,16 @@
package common
import (
"fmt"
"math/rand"
)
func GenerateIP() string {
// Generate a random number between 20 and 240
segment2 := rand.Intn(221) + 20
segment3 := rand.Intn(256)
segment4 := rand.Intn(256)
ipAddress := fmt.Sprintf("104.%d.%d.%d", segment2, segment3, segment4)
return ipAddress
}