feat(d-eyes): init

This commit is contained in:
zitn
2023-11-06 16:31:16 +08:00
parent 804617ded3
commit 270bb18b98
117 changed files with 19222 additions and 0 deletions

27
process/utils/iputil.go Normal file
View File

@@ -0,0 +1,27 @@
package utils
import (
"math/big"
"net"
)
type IntIP struct {
IP string
Intip int64
}
func (i *IntIP) toIntIp() int64 {
ret := big.NewInt(0)
ret.SetBytes(net.ParseIP(i.IP).To4())
return ret.Int64()
}
func CheckIpInipconfig(ipList []string, ip string) bool {
for _, hip := range ipList {
if hip == ip {
return true
}
}
return false
}