Fix: sorted IP addresses for servers.json (#574)
- Reduce deltas between updates - Applies to the following providers - IPVanish - IVPN - Surfshark - Torguard - VPNUnlimited
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,7 @@ func getResolveSettings(minServers int) (settings resolver.ParallelSettings) {
|
|||||||
BetweenDuration: betweenDuration,
|
BetweenDuration: betweenDuration,
|
||||||
MaxNoNew: maxNoNew,
|
MaxNoNew: maxNoNew,
|
||||||
MaxFails: maxFails,
|
MaxFails: maxFails,
|
||||||
|
SortIPs: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ func Test_resolveHosts(t *testing.T) {
|
|||||||
BetweenDuration: betweenDuration,
|
BetweenDuration: betweenDuration,
|
||||||
MaxNoNew: maxNoNew,
|
MaxNoNew: maxNoNew,
|
||||||
MaxFails: maxFails,
|
MaxFails: maxFails,
|
||||||
|
SortIPs: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
presolver.EXPECT().Resolve(ctx, hosts, expectedSettings).
|
presolver.EXPECT().Resolve(ctx, hosts, expectedSettings).
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ func getResolveSettings(minServers int) (settings resolver.ParallelSettings) {
|
|||||||
BetweenDuration: betweenDuration,
|
BetweenDuration: betweenDuration,
|
||||||
MaxNoNew: maxNoNew,
|
MaxNoNew: maxNoNew,
|
||||||
MaxFails: maxFails,
|
MaxFails: maxFails,
|
||||||
|
SortIPs: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ func Test_resolveHosts(t *testing.T) {
|
|||||||
BetweenDuration: betweenDuration,
|
BetweenDuration: betweenDuration,
|
||||||
MaxNoNew: maxNoNew,
|
MaxNoNew: maxNoNew,
|
||||||
MaxFails: maxFails,
|
MaxFails: maxFails,
|
||||||
|
SortIPs: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
presolver.EXPECT().Resolve(ctx, hosts, expectedSettings).
|
presolver.EXPECT().Resolve(ctx, hosts, expectedSettings).
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ func resolveHosts(ctx context.Context, presolver resolver.Parallel,
|
|||||||
BetweenDuration: betweenDuration,
|
BetweenDuration: betweenDuration,
|
||||||
MaxNoNew: maxNoNew,
|
MaxNoNew: maxNoNew,
|
||||||
MaxFails: maxFails,
|
MaxFails: maxFails,
|
||||||
|
SortIPs: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return presolver.Resolve(ctx, hosts, settings)
|
return presolver.Resolve(ctx, hosts, settings)
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ func resolveHosts(ctx context.Context, presolver resolver.Parallel,
|
|||||||
BetweenDuration: betweenDuration,
|
BetweenDuration: betweenDuration,
|
||||||
MaxNoNew: maxNoNew,
|
MaxNoNew: maxNoNew,
|
||||||
MaxFails: maxFails,
|
MaxFails: maxFails,
|
||||||
|
SortIPs: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return presolver.Resolve(ctx, hosts, settings)
|
return presolver.Resolve(ctx, hosts, settings)
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ func resolveHosts(ctx context.Context, presolver resolver.Parallel,
|
|||||||
BetweenDuration: betweenDuration,
|
BetweenDuration: betweenDuration,
|
||||||
MaxNoNew: maxNoNew,
|
MaxNoNew: maxNoNew,
|
||||||
MaxFails: maxFails,
|
MaxFails: maxFails,
|
||||||
|
SortIPs: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return presolver.Resolve(ctx, hosts, settings)
|
return presolver.Resolve(ctx, hosts, settings)
|
||||||
|
|||||||
Reference in New Issue
Block a user