Add Hetzner and DigitalOcean regions

This PR adds the known regions from DO and Hetzner to the config output from S3Config
This commit is contained in:
Kenneth Skovhede
2026-03-12 11:20:46 +01:00
parent f3a559d190
commit 668dabfc94
2 changed files with 22 additions and 1 deletions
+17
View File
@@ -149,6 +149,23 @@ namespace Duplicati.Library.Backend
{ "EU", "eu-west-1" }
};
public static readonly Dictionary<string, string?> DIGITALOCEAN_REGIONS = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase)
{
{ "New York (nyc3)", "nyc3" },
{ "Amsterdam (ams3)", "ams3" },
{ "Singapore (sgp1)", "sgp1" },
{ "Frankfurt (fra1)", "fra1" },
{ "Sydney (syd1)", "syd1" }
};
public static readonly Dictionary<string, string?> HETZNER_REGIONS = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase)
{
{ "Falkenstein (fsn1)", "fsn1" },
{ "Nuremberg (nbg1)", "nbg1" },
{ "Helsinki (hel1)", "hel1" },
{ "Ashburn, VA (ash)", "ash" }
};
public static readonly Dictionary<string, string?> DEFAULT_S3_LOCATION_BASED_HOSTS;
public static readonly Dictionary<string, string?> KNOWN_S3_STORAGE_CLASSES;
+5 -1
View File
@@ -34,7 +34,9 @@ namespace Duplicati.Library.Backend
Providers,
Regions,
RegionHosts,
StorageClasses
StorageClasses,
DigitalOceanRegions,
HetznerRegions,
}
public S3Config()
@@ -68,6 +70,8 @@ namespace Duplicati.Library.Backend
{ ConfigType.Regions.ToString(), S3.KNOWN_S3_LOCATIONS.ToDictionary((x) => x.Key, (y) => y.Value) },
{ ConfigType.RegionHosts.ToString(), S3.DEFAULT_S3_LOCATION_BASED_HOSTS.ToDictionary((x) => x.Key, (y) => y.Value) },
{ ConfigType.StorageClasses.ToString(), S3.KNOWN_S3_STORAGE_CLASSES.ToDictionary((x) => x.Key, (y) => y.Value) },
{ ConfigType.DigitalOceanRegions.ToString(), S3.DIGITALOCEAN_REGIONS.ToDictionary((x) => x.Key, (y) => y.Value) },
{ ConfigType.HetznerRegions.ToString(), S3.HETZNER_REGIONS.ToDictionary((x) => x.Key, (y) => y.Value) },
};
#endregion