mirror of
https://github.com/XIU2/CloudflareSpeedTest.git
synced 2026-03-02 20:12:51 +08:00
fix full ip lost 255 bug
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user