From 668dabfc94a21cc4b3da747afc908c87a42f6ea7 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Thu, 12 Mar 2026 11:20:46 +0100 Subject: [PATCH] Add Hetzner and DigitalOcean regions This PR adds the known regions from DO and Hetzner to the config output from S3Config --- Duplicati/Library/Backend/S3/S3Backend.cs | 17 +++++++++++++++++ Duplicati/Library/Backend/S3/S3Config.cs | 6 +++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Duplicati/Library/Backend/S3/S3Backend.cs b/Duplicati/Library/Backend/S3/S3Backend.cs index e464378c1..9672bea62 100644 --- a/Duplicati/Library/Backend/S3/S3Backend.cs +++ b/Duplicati/Library/Backend/S3/S3Backend.cs @@ -149,6 +149,23 @@ namespace Duplicati.Library.Backend { "EU", "eu-west-1" } }; + public static readonly Dictionary DIGITALOCEAN_REGIONS = new Dictionary(StringComparer.OrdinalIgnoreCase) + { + { "New York (nyc3)", "nyc3" }, + { "Amsterdam (ams3)", "ams3" }, + { "Singapore (sgp1)", "sgp1" }, + { "Frankfurt (fra1)", "fra1" }, + { "Sydney (syd1)", "syd1" } + }; + + public static readonly Dictionary HETZNER_REGIONS = new Dictionary(StringComparer.OrdinalIgnoreCase) + { + { "Falkenstein (fsn1)", "fsn1" }, + { "Nuremberg (nbg1)", "nbg1" }, + { "Helsinki (hel1)", "hel1" }, + { "Ashburn, VA (ash)", "ash" } + }; + public static readonly Dictionary DEFAULT_S3_LOCATION_BASED_HOSTS; public static readonly Dictionary KNOWN_S3_STORAGE_CLASSES; diff --git a/Duplicati/Library/Backend/S3/S3Config.cs b/Duplicati/Library/Backend/S3/S3Config.cs index 8c709619d..51f3b5b85 100644 --- a/Duplicati/Library/Backend/S3/S3Config.cs +++ b/Duplicati/Library/Backend/S3/S3Config.cs @@ -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