diff --git a/SimpleDnsCrypt/App.config b/SimpleDnsCrypt/App.config index 9450023a..be735fc6 100644 --- a/SimpleDnsCrypt/App.config +++ b/SimpleDnsCrypt/App.config @@ -1,28 +1,21 @@ - + - -
+ +
- + - + - + @@ -45,7 +38,7 @@ True - + 2 @@ -54,16 +47,16 @@ True - + - + - + - + True @@ -84,13 +77,13 @@ True - + False - + 825 @@ -100,4 +93,4 @@ - \ No newline at end of file + diff --git a/SimpleDnsCrypt/DNSx64/dnscrypt-proxy.exe b/SimpleDnsCrypt/DNSx64/dnscrypt-proxy.exe index b67b0aa5..8ccb040d 100644 Binary files a/SimpleDnsCrypt/DNSx64/dnscrypt-proxy.exe and b/SimpleDnsCrypt/DNSx64/dnscrypt-proxy.exe differ diff --git a/SimpleDnsCrypt/DNSx86/dnscrypt-proxy.exe b/SimpleDnsCrypt/DNSx86/dnscrypt-proxy.exe index 2f290880..6dc14273 100644 Binary files a/SimpleDnsCrypt/DNSx86/dnscrypt-proxy.exe and b/SimpleDnsCrypt/DNSx86/dnscrypt-proxy.exe differ diff --git a/SimpleDnsCrypt/Helper/PatchHelper.cs b/SimpleDnsCrypt/Helper/PatchHelper.cs index eada2e24..82e8c7e6 100644 --- a/SimpleDnsCrypt/Helper/PatchHelper.cs +++ b/SimpleDnsCrypt/Helper/PatchHelper.cs @@ -96,6 +96,19 @@ public static bool Patch() }; return DnscryptProxyConfigurationManager.SaveConfiguration(); } + if (version.Equals("0.7.2")) + { + //removed: daemonize + var configFile = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), Global.DnsCryptProxyFolder, Global.DnsCryptConfigurationFile); + if (!System.IO.File.Exists(configFile)) return false; + var settings = Nett.TomlSettings.Create(s => s.ConfigurePropertyMapping(m => m.UseTargetPropertySelector(standardSelectors => standardSelectors.IgnoreCase))); + + Nett.TomlTable toml = Nett.Toml.ReadFile(configFile); + toml.Remove("daemonize"); + DnscryptProxyConfigurationManager.DnscryptProxyConfiguration = Nett.Toml.ReadString(toml.ToString(), settings); + + return DnscryptProxyConfigurationManager.SaveConfiguration(); + } return false; } diff --git a/SimpleDnsCrypt/Models/DnscryptProxyConfiguration.cs b/SimpleDnsCrypt/Models/DnscryptProxyConfiguration.cs index d58cef38..732f76a6 100644 --- a/SimpleDnsCrypt/Models/DnscryptProxyConfiguration.cs +++ b/SimpleDnsCrypt/Models/DnscryptProxyConfiguration.cs @@ -228,11 +228,6 @@ public bool require_nofilter } } - /// - /// linux only. - /// - public bool daemonize { get; set; } = false; - /// /// Always use TCP to connect to upstream servers. /// @@ -742,12 +737,12 @@ public int cache_neg_max_ttl /// /// Pattern-based blocking (blacklists). /// - public Blacklist blacklist { get; set; } + public Blacklist blocked_names { get; set; } /// /// Pattern-based IP blocking (IP blacklists). /// - public Blacklist ip_blacklist { get; set; } + public Blacklist blocked_ips { get; set; } public AnonymizedDns anonymized_dns { get; set; } @@ -986,7 +981,7 @@ public string file public class Blacklist : PropertyChangedBase { private string _log_format; - private string _blacklist_file; + private string _blocked_names_file; private string _log_file; [TomlIgnore] @@ -999,13 +994,13 @@ public class Blacklist : PropertyChangedBase /// /// Path to the file of blocking rules. /// - public string blacklist_file + public string blocked_names_file { - get => _blacklist_file; + get => _blocked_names_file; set { - _blacklist_file = value; - NotifyOfPropertyChange(() => blacklist_file); + _blocked_names_file = value; + NotifyOfPropertyChange(() => blocked_names_file); } } diff --git a/SimpleDnsCrypt/Properties/AssemblyInfo.cs b/SimpleDnsCrypt/Properties/AssemblyInfo.cs index 2e1761fc..688e9ff8 100644 --- a/SimpleDnsCrypt/Properties/AssemblyInfo.cs +++ b/SimpleDnsCrypt/Properties/AssemblyInfo.cs @@ -14,5 +14,5 @@ ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly )] -[assembly: AssemblyVersion("0.7.1")] -[assembly: AssemblyFileVersion("0.7.1")] +[assembly: AssemblyVersion("0.7.2")] +[assembly: AssemblyFileVersion("0.7.2")] diff --git a/SimpleDnsCrypt/Properties/Resources.Designer.cs b/SimpleDnsCrypt/Properties/Resources.Designer.cs index 3597ec5e..58613a5c 100644 --- a/SimpleDnsCrypt/Properties/Resources.Designer.cs +++ b/SimpleDnsCrypt/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace SimpleDnsCrypt.Properties { // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/SimpleDnsCrypt/Properties/Settings.Designer.cs b/SimpleDnsCrypt/Properties/Settings.Designer.cs index d01ff82b..a6d0c927 100644 --- a/SimpleDnsCrypt/Properties/Settings.Designer.cs +++ b/SimpleDnsCrypt/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace SimpleDnsCrypt.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/SimpleDnsCrypt/Resources/Translation.Designer.cs b/SimpleDnsCrypt/Resources/Translation.Designer.cs index 360ed5b8..130786dc 100644 --- a/SimpleDnsCrypt/Resources/Translation.Designer.cs +++ b/SimpleDnsCrypt/Resources/Translation.Designer.cs @@ -19,7 +19,7 @@ namespace SimpleDnsCrypt.Resources { // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Translation { diff --git a/SimpleDnsCrypt/SimpleDnsCrypt.csproj b/SimpleDnsCrypt/SimpleDnsCrypt.csproj index 5e8c8c1f..f1721ab1 100644 --- a/SimpleDnsCrypt/SimpleDnsCrypt.csproj +++ b/SimpleDnsCrypt/SimpleDnsCrypt.csproj @@ -8,13 +8,14 @@ WinExe SimpleDnsCrypt SimpleDnsCrypt - v4.6.1 + v4.8 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 true + x64 @@ -562,7 +563,7 @@ - $(TargetFrameworkSDKToolsDirectory)$(PlatformTarget)\ + $(TargetFrameworkSDKToolsDirectory)\ copy "$(ProjectDir)DNS$(PlatformName)\*" "$(ProjectDir)$(OutDir)\dnscrypt-proxy\" diff --git a/SimpleDnsCrypt/ViewModels/DomainBlacklistViewModel.cs b/SimpleDnsCrypt/ViewModels/DomainBlacklistViewModel.cs index 540d96a5..83706667 100644 --- a/SimpleDnsCrypt/ViewModels/DomainBlacklistViewModel.cs +++ b/SimpleDnsCrypt/ViewModels/DomainBlacklistViewModel.cs @@ -132,26 +132,26 @@ private async void ManageDnsCryptBlacklist(DnscryptProxyConfiguration dnscryptPr if (dnscryptProxyConfiguration == null) return; var saveAndRestartService = false; - if (dnscryptProxyConfiguration.blacklist == null) + if (dnscryptProxyConfiguration.blocked_names == null) { - dnscryptProxyConfiguration.blacklist = new Blacklist + dnscryptProxyConfiguration.blocked_names = new Blacklist { - blacklist_file = _domainBlacklistFile, + blocked_names_file = _domainBlacklistFile, log_format = defaultLogFormat }; saveAndRestartService = true; } - if (string.IsNullOrEmpty(dnscryptProxyConfiguration.blacklist.log_format) || - !dnscryptProxyConfiguration.blacklist.log_format.Equals(defaultLogFormat)) + if (string.IsNullOrEmpty(dnscryptProxyConfiguration.blocked_names.log_format) || + !dnscryptProxyConfiguration.blocked_names.log_format.Equals(defaultLogFormat)) { - dnscryptProxyConfiguration.blacklist.log_format = defaultLogFormat; + dnscryptProxyConfiguration.blocked_names.log_format = defaultLogFormat; saveAndRestartService = true; } - if (string.IsNullOrEmpty(dnscryptProxyConfiguration.blacklist.blacklist_file)) + if (string.IsNullOrEmpty(dnscryptProxyConfiguration.blocked_names.blocked_names_file)) { - dnscryptProxyConfiguration.blacklist.blacklist_file = _domainBlacklistFile; + dnscryptProxyConfiguration.blocked_names.blocked_names_file = _domainBlacklistFile; saveAndRestartService = true; } @@ -196,7 +196,7 @@ private async void ManageDnsCryptBlacklist(DnscryptProxyConfiguration dnscryptPr { //disable blacklist again _isBlacklistEnabled = false; - dnscryptProxyConfiguration.blacklist.blacklist_file = null; + dnscryptProxyConfiguration.blocked_names.blocked_names_file = null; DnscryptProxyConfigurationManager.DnscryptProxyConfiguration = dnscryptProxyConfiguration; DnscryptProxyConfigurationManager.SaveConfiguration(); if (DnsCryptProxyManager.IsDnsCryptProxyRunning()) diff --git a/SimpleDnsCrypt/ViewModels/DomainBlockLogViewModel.cs b/SimpleDnsCrypt/ViewModels/DomainBlockLogViewModel.cs index ec4f636c..f4d18dfe 100644 --- a/SimpleDnsCrypt/ViewModels/DomainBlockLogViewModel.cs +++ b/SimpleDnsCrypt/ViewModels/DomainBlockLogViewModel.cs @@ -132,9 +132,9 @@ private async void DomainBlockLog(DnscryptProxyConfiguration dnscryptProxyConfig if (dnscryptProxyConfiguration == null) return; var saveAndRestartService = false; - if (dnscryptProxyConfiguration.blacklist == null) + if (dnscryptProxyConfiguration.blocked_names == null) { - dnscryptProxyConfiguration.blacklist = new Blacklist + dnscryptProxyConfiguration.blocked_names = new Blacklist { log_file = Global.DomainBlockLogFileName, log_format = defaultLogFormat @@ -142,16 +142,16 @@ private async void DomainBlockLog(DnscryptProxyConfiguration dnscryptProxyConfig saveAndRestartService = true; } - if (string.IsNullOrEmpty(dnscryptProxyConfiguration.blacklist.log_format) || - !dnscryptProxyConfiguration.blacklist.log_format.Equals(defaultLogFormat)) + if (string.IsNullOrEmpty(dnscryptProxyConfiguration.blocked_names.log_format) || + !dnscryptProxyConfiguration.blocked_names.log_format.Equals(defaultLogFormat)) { - dnscryptProxyConfiguration.blacklist.log_format = defaultLogFormat; + dnscryptProxyConfiguration.blocked_names.log_format = defaultLogFormat; saveAndRestartService = true; } - if (string.IsNullOrEmpty(dnscryptProxyConfiguration.blacklist.log_file)) + if (string.IsNullOrEmpty(dnscryptProxyConfiguration.blocked_names.log_file)) { - dnscryptProxyConfiguration.blacklist.log_file = Global.DomainBlockLogFileName; + dnscryptProxyConfiguration.blocked_names.log_file = Global.DomainBlockLogFileName; saveAndRestartService = true; } @@ -187,7 +187,7 @@ private async void DomainBlockLog(DnscryptProxyConfiguration dnscryptProxyConfig } DomainBlockLogFile = Path.Combine(Directory.GetCurrentDirectory(), Global.DnsCryptProxyFolder, - dnscryptProxyConfiguration.blacklist.log_file); + dnscryptProxyConfiguration.blocked_names.log_file); if (!string.IsNullOrEmpty(_domainBlockLogFile)) { @@ -238,7 +238,7 @@ await Task.Run(() => { //disable block log again _isDomainBlockLogLogging = false; - dnscryptProxyConfiguration.blacklist.log_file = null; + dnscryptProxyConfiguration.blocked_names.log_file = null; DnscryptProxyConfigurationManager.DnscryptProxyConfiguration = dnscryptProxyConfiguration; DnscryptProxyConfigurationManager.SaveConfiguration(); if (DnsCryptProxyManager.IsDnsCryptProxyRunning()) diff --git a/SimpleDnsCrypt/ViewModels/MainViewModel.cs b/SimpleDnsCrypt/ViewModels/MainViewModel.cs index c4cdc9bd..4ae8ec44 100644 --- a/SimpleDnsCrypt/ViewModels/MainViewModel.cs +++ b/SimpleDnsCrypt/ViewModels/MainViewModel.cs @@ -497,20 +497,20 @@ public void Initialize() QueryLogViewModel.IsQueryLogLogging = true; } - if (!string.IsNullOrEmpty(DnscryptProxyConfiguration?.blacklist?.log_file)) + if (!string.IsNullOrEmpty(DnscryptProxyConfiguration?.blocked_names?.log_file)) { - if (!File.Exists(DnscryptProxyConfiguration.blacklist.log_file)) + if (!File.Exists(DnscryptProxyConfiguration.blocked_names.log_file)) { - File.Create(DnscryptProxyConfiguration.blacklist.log_file).Dispose(); + File.Create(DnscryptProxyConfiguration.blocked_names.log_file).Dispose(); } DomainBlockLogViewModel.IsDomainBlockLogLogging = true; } - if (!string.IsNullOrEmpty(DnscryptProxyConfiguration?.blacklist?.blacklist_file)) + if (!string.IsNullOrEmpty(DnscryptProxyConfiguration?.blocked_names?.blocked_names_file)) { - if (!File.Exists(DnscryptProxyConfiguration.blacklist.blacklist_file)) + if (!File.Exists(DnscryptProxyConfiguration.blocked_names.blocked_names_file)) { - File.Create(DnscryptProxyConfiguration.blacklist.blacklist_file).Dispose(); + File.Create(DnscryptProxyConfiguration.blocked_names.blocked_names_file).Dispose(); } DomainBlacklistViewModel.IsBlacklistEnabled = true; } diff --git a/SimpleDnsCrypt/dnscrypt-proxy/dnscrypt-proxy.toml b/SimpleDnsCrypt/dnscrypt-proxy/dnscrypt-proxy.toml index 403418ec..7a6cf8dd 100644 --- a/SimpleDnsCrypt/dnscrypt-proxy/dnscrypt-proxy.toml +++ b/SimpleDnsCrypt/dnscrypt-proxy/dnscrypt-proxy.toml @@ -35,9 +35,9 @@ format = 'ltsv' [nx_log] format = 'ltsv' -[blacklist] +[blocked_names] -[ip_blacklist] +[blocked_ips] [broken_implementations] fragments_blocked = ['cisco', 'cisco-ipv6', 'cisco-familyshield', 'cisco-familyshield-ipv6', 'quad9-dnscrypt-ip4-filter-alt', 'quad9-dnscrypt-ip4-filter-pri', 'quad9-dnscrypt-ip4-nofilter-alt', 'quad9-dnscrypt-ip4-nofilter-pri', 'quad9-dnscrypt-ip6-filter-alt', 'quad9-dnscrypt-ip6-filter-pri', 'quad9-dnscrypt-ip6-nofilter-alt', 'quad9-dnscrypt-ip6-nofilter-pri', 'cleanbrowsing-adult', 'cleanbrowsing-family-ipv6', 'cleanbrowsing-family', 'cleanbrowsing-security']