Update ufw
All checks were successful
CI.yml / build (push) Successful in 38s

This commit is contained in:
d3m0k1d
2026-01-11 17:56:19 +03:00
parent 1cc9f3d191
commit 424f5db9af
2 changed files with 34 additions and 4 deletions

View File

@@ -0,0 +1,18 @@
package blocker
import (
"fmt"
"net"
)
func validateIP(ip string) error {
if ip == "" {
return fmt.Errorf("empty IP")
}
if net.ParseIP(ip) == nil {
return fmt.Errorf("invalid IP: %s", ip)
}
return nil
}