diff --git a/.gitignore b/.gitignore
index 3a76619a..8a30d258 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
-## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
@@ -90,6 +90,7 @@ StyleCopReport.xml
*.tmp_proj
*_wpftmp.csproj
*.log
+*.tlog
*.vspscc
*.vssscc
.builds
@@ -293,6 +294,17 @@ node_modules/
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
+# Visual Studio 6 auto-generated project file (contains which files were open etc.)
+*.vbp
+
+# Visual Studio 6 workspace and project file (working project files containing files to include in project)
+*.dsw
+*.dsp
+
+# Visual Studio 6 technical files
+*.ncb
+*.aps
+
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
@@ -349,6 +361,9 @@ ASALocalRun/
# Local History for Visual Studio
.localhistory/
+# Visual Studio History (VSHistory) files
+.vshistory/
+
# BeatPulse healthcheck temp database
healthchecksdb
@@ -361,5 +376,23 @@ MigrationBackup/
# Fody - auto-generated XML schema
FodyWeavers.xsd
-# Azure Resource Manager dependency files
-ServiceDependencies/
\ No newline at end of file
+# VS Code files for those working on multiple tools
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+*.code-workspace
+
+# Local History for Visual Studio Code
+.history/
+
+# Windows Installer files from build outputs
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# JetBrains Rider
+*.sln.iml
diff --git a/KeyVault.Acmebot/KeyVault.Acmebot.csproj b/KeyVault.Acmebot/KeyVault.Acmebot.csproj
index f9810d1d..95ab3374 100644
--- a/KeyVault.Acmebot/KeyVault.Acmebot.csproj
+++ b/KeyVault.Acmebot/KeyVault.Acmebot.csproj
@@ -4,7 +4,7 @@
v4
-
+
@@ -14,7 +14,7 @@
-
+
diff --git a/KeyVault.Acmebot/Options/AcmebotOptions.cs b/KeyVault.Acmebot/Options/AcmebotOptions.cs
index 3d5e5dfa..2fe08aea 100644
--- a/KeyVault.Acmebot/Options/AcmebotOptions.cs
+++ b/KeyVault.Acmebot/Options/AcmebotOptions.cs
@@ -27,6 +27,8 @@ public class AcmebotOptions
[Range(0, 365)]
public int RenewBeforeExpiry { get; set; } = 30;
+ public bool UseSystemNameServer { get; set; } = false;
+
public ExternalAccountBindingOptions ExternalAccountBinding { get; set; }
// Properties should be in alphabetical order
diff --git a/KeyVault.Acmebot/Startup.cs b/KeyVault.Acmebot/Startup.cs
index 5376cb8e..c29cf587 100644
--- a/KeyVault.Acmebot/Startup.cs
+++ b/KeyVault.Acmebot/Startup.cs
@@ -40,11 +40,17 @@ public override void Configure(IFunctionsHostBuilder builder)
builder.Services.AddSingleton>();
- builder.Services.AddSingleton(new LookupClient(new LookupClientOptions(NameServer.GooglePublicDns, NameServer.GooglePublicDns2)
+ builder.Services.AddSingleton(provider =>
{
- UseCache = false,
- UseRandomNameServer = true
- }));
+ var options = provider.GetRequiredService>();
+
+ var lookupClientOptions = options.Value.UseSystemNameServer ? new LookupClientOptions() : new LookupClientOptions(NameServer.GooglePublicDns, NameServer.GooglePublicDns2);
+
+ lookupClientOptions.UseCache = false;
+ lookupClientOptions.UseRandomNameServer = true;
+
+ return new LookupClient(lookupClientOptions);
+ });
builder.Services.AddSingleton(provider =>
{