diff --git a/proton-checker.py b/proton-checker.py index 7197ba7..3189de6 100644 --- a/proton-checker.py +++ b/proton-checker.py @@ -56,9 +56,12 @@ if __name__ == "__main__": # Write to rbldnsd-compliant file with open(output_file, "w") as f: f.write(":127.0.0.4:Listed, see https://protonvpn.com\n") # Header - for ip_range, (country_code, server_names) in ip_range_groups.items(): + # Iterate through IP ranges in sorted order + for ip_range in sorted(ip_range_groups.keys()): + country_code, server_names = ip_range_groups[ip_range] f.write(f"{ip_range} ; ProtonVPN {country_code}\n") + # Calculate and print stats total_ranges = len(ip_range_groups) ranges_per_country = Counter(country_code for country_code, _ in ip_range_groups.values())