1
0

merge: 合并代码20240706

This commit is contained in:
TsMask
2024-07-06 18:27:00 +08:00
parent 3b50e2f3f8
commit 49860c2f28
145 changed files with 4366 additions and 4051 deletions

View File

@@ -172,10 +172,10 @@ func Color(colorStr string) *color.RGBA {
}
}
// ConvertIPMask 转换IP网络地址掩码 24 -> 255.255.255.0
// ConvertIPMask 转换IP网络地址掩码 24->"255.255.255.0" 20->"255.255.240.0"
func ConvertIPMask(bits int64) string {
if bits < 0 || bits > 32 {
return "Invalid Mask Bits"
return "255.255.255.255"
}
// 构建一个32位的uint32类型掩码指定前bits位为1其余为0