Closed Bagerter closed 1 year ago
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
Fixed
func Middleware() fiber.Handler {
return func(c *fiber.Ctx) error {
ja3Hash, err := generateJA3Hash(c)
if err != nil {
fmt.Println("error get ja3")
}
fmt.Println(ja3Hash)
return c.Next()
}
}
func generateJA3Hash(c *fiber.Ctx) (string, error) {
tlsInfo := c.ClientHelloInfo()
if tlsInfo == nil {
return "", fmt.Errorf("eror")
}
var fingerprint string
for _, suite := range tlsInfo.CipherSuites[1:] {
fingerprint += fmt.Sprintf("0x%x,", suite)
}
for _, curve := range tlsInfo.SupportedCurves[1:] {
fingerprint += fmt.Sprintf("0x%x,", curve)
}
for _, point := range tlsInfo.SupportedPoints[1:] {
fingerprint += fmt.Sprintf("0x%x,", point)
}
return fingerprint, nil
}
Question Description
Hello, help pls, how to get ja3 client hash?
Code Snippet (optional)
No response
Checklist: