feat(auth): enhance IP restriction handling with CIDR support

This commit is contained in:
CaIon
2025-12-15 17:24:09 +08:00
parent 4ea8cbd207
commit 39593052b6
12 changed files with 63 additions and 47 deletions

View File

@@ -217,11 +217,6 @@ func IntMax(a int, b int) int {
}
}
func IsIP(s string) bool {
ip := net.ParseIP(s)
return ip != nil
}
func GetUUID() string {
code := uuid.New().String()
code = strings.Replace(code, "-", "", -1)