Skip to content

Commit ee6c904

Browse files
authored
Refactoring
1 parent 335f040 commit ee6c904

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

GostGen/source/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,8 @@ private static async Task<bool> UpdateGostServersAsync(GostConfig gostConfig)
402402

403403
var cfgChanged = false;
404404
Log.Information("Start to create/update GOST servers");
405-
var countries = relays.Where(r => !string.IsNullOrWhiteSpace(r.CountryName)).OrderBy(r => r.CountryName).GroupBy(r => r.CountryName).ToArray();
406-
Log.Debug($"Found {countries.Length} server countries");
407-
408405
ICollection<Proxy> proxies = new List<Proxy>();
406+
var countries = relays.Where(r => !string.IsNullOrWhiteSpace(r.CountryName)).OrderBy(r => r.CountryName).GroupBy(r => r.CountryName).ToArray();
409407
foreach (var country in countries)
410408
{
411409
var cities = country.Where(r => !string.IsNullOrWhiteSpace(r.CityName)).OrderBy(r => r.CityName).GroupBy(r => r.CityName).Where(g => g.Any()).ToArray();
@@ -665,4 +663,6 @@ private static void ExportProxyJson(ICollection<Proxy> proxies)
665663
Log.Fatal(err, $"Error on exporting proxy json {ExportJsonFile}");
666664
}
667665
}
666+
667+
private record Proxy(bool IsPool, MullvadRelay Server, ServiceConfig Service);
668668
}

0 commit comments

Comments
 (0)