fix full ip lost 255 bug
This commit is contained in:
parent
ed0a8bbfea
commit
2fa023c7f3
|
@ -95,8 +95,8 @@ func (r *IPRanges) chooseIPv4() {
|
|||
minIP, hosts := r.getIPRange()
|
||||
for r.ipNet.Contains(r.firstIP) {
|
||||
if TestAll { // 如果是测速全部 IP
|
||||
for i := byte(0); i < hosts; i++ { // 遍历 IP 最后一段最小值到最大值
|
||||
r.appendIPv4(i + minIP)
|
||||
for i := 0; i <= int(hosts); i++ { // 遍历 IP 最后一段最小值到最大值
|
||||
r.appendIPv4(byte(i) + minIP)
|
||||
}
|
||||
} else { // 随机 IP 的最后一段 0.0.0.X
|
||||
r.appendIPv4(minIP + randIPEndWith(hosts))
|
||||
|
|
Loading…
Reference in New Issue