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:
Quentin McGaw
2021-08-21 16:03:18 -07:00
committed by GitHub
parent ff56857fc8
commit 0bfd58a3f5
8 changed files with 1617 additions and 1216 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -24,6 +24,7 @@ func getResolveSettings(minServers int) (settings resolver.ParallelSettings) {
BetweenDuration: betweenDuration,
MaxNoNew: maxNoNew,
MaxFails: maxFails,
SortIPs: true,
},
}
}

View File

@@ -44,6 +44,7 @@ func Test_resolveHosts(t *testing.T) {
BetweenDuration: betweenDuration,
MaxNoNew: maxNoNew,
MaxFails: maxFails,
SortIPs: true,
},
}
presolver.EXPECT().Resolve(ctx, hosts, expectedSettings).

View File

@@ -24,6 +24,7 @@ func getResolveSettings(minServers int) (settings resolver.ParallelSettings) {
BetweenDuration: betweenDuration,
MaxNoNew: maxNoNew,
MaxFails: maxFails,
SortIPs: true,
},
}
}

View File

@@ -44,6 +44,7 @@ func Test_resolveHosts(t *testing.T) {
BetweenDuration: betweenDuration,
MaxNoNew: maxNoNew,
MaxFails: maxFails,
SortIPs: true,
},
}
presolver.EXPECT().Resolve(ctx, hosts, expectedSettings).

View File

@@ -26,6 +26,7 @@ func resolveHosts(ctx context.Context, presolver resolver.Parallel,
BetweenDuration: betweenDuration,
MaxNoNew: maxNoNew,
MaxFails: maxFails,
SortIPs: true,
},
}
return presolver.Resolve(ctx, hosts, settings)

View File

@@ -26,6 +26,7 @@ func resolveHosts(ctx context.Context, presolver resolver.Parallel,
BetweenDuration: betweenDuration,
MaxNoNew: maxNoNew,
MaxFails: maxFails,
SortIPs: true,
},
}
return presolver.Resolve(ctx, hosts, settings)

View File

@@ -26,6 +26,7 @@ func resolveHosts(ctx context.Context, presolver resolver.Parallel,
BetweenDuration: betweenDuration,
MaxNoNew: maxNoNew,
MaxFails: maxFails,
SortIPs: true,
},
}
return presolver.Resolve(ctx, hosts, settings)