Skip to content

Commit

Permalink
Updated dnscrypt-proxy to 2.0.31
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbeans committed Nov 4, 2019
1 parent f4a48fd commit e1ffd80
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 29 deletions.
Binary file modified SimpleDnsCrypt/DNSx64/dnscrypt-proxy.exe
Binary file not shown.
Binary file modified SimpleDnsCrypt/DNSx86/dnscrypt-proxy.exe
Binary file not shown.
26 changes: 21 additions & 5 deletions SimpleDnsCrypt/Helper/PatchHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
public static class PatchHelper
{
public static bool Patch()
{
var version = VersionHelper.PublishVersion;
{
var version = VersionHelper.PublishVersion;
if (!DnscryptProxyConfigurationManager.LoadConfiguration()) return false;
if (version.Equals("0.6.5"))
{
{
//added: netprobe_address = '255.255.255.0:53'
//changed: netprobe_timeout = 0
DnscryptProxyConfigurationManager.DnscryptProxyConfiguration.netprobe_address = "255.255.255.0:53";
DnscryptProxyConfigurationManager.DnscryptProxyConfiguration.netprobe_timeout = 0;
return DnscryptProxyConfigurationManager.SaveConfiguration();
}
}
if (version.Equals("0.6.6"))
{
//changed: netprobe_address = '9.9.9.9:53'
Expand All @@ -25,7 +25,23 @@ public static bool Patch()
DnscryptProxyConfigurationManager.DnscryptProxyConfiguration.netprobe_timeout = 60;
return DnscryptProxyConfigurationManager.SaveConfiguration();
}
if (version.Equals("0.6.8"))
{
//changed: timeout = 5000
//added: reject_ttl = 600
//changed: cache_size = 1024
//changed: cache_min_ttl = 2400
//added: cache_neg_min_ttl = 60
//added: cache_neg_max_ttl = 600
DnscryptProxyConfigurationManager.DnscryptProxyConfiguration.timeout = 5000;
DnscryptProxyConfigurationManager.DnscryptProxyConfiguration.reject_ttl = 600;
DnscryptProxyConfigurationManager.DnscryptProxyConfiguration.cache_size = 1024;
DnscryptProxyConfigurationManager.DnscryptProxyConfiguration.cache_min_ttl = 2400;
DnscryptProxyConfigurationManager.DnscryptProxyConfiguration.cache_neg_min_ttl = 60;
DnscryptProxyConfigurationManager.DnscryptProxyConfiguration.cache_neg_max_ttl = 600;
return DnscryptProxyConfigurationManager.SaveConfiguration();
}
return false;
}
}
}
}
61 changes: 45 additions & 16 deletions SimpleDnsCrypt/Models/DnscryptProxyConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ public class DnscryptProxyConfiguration : PropertyChangedBase
private int _log_files_max_age;
private int _log_files_max_backups;
private bool _block_ipv6;
private int _reject_ttl;
private string _forwarding_rules;
private string _cloaking_rules;
private int _cache_neg_ttl;
private int _cache_neg_min_ttl;
private int _cache_neg_max_ttl;
private int _cache_max_ttl;
private int _cache_min_ttl;
private int _cache_size;
Expand All @@ -51,7 +53,7 @@ public class DnscryptProxyConfiguration : PropertyChangedBase
private Dictionary<string, Static> _static;
private string _proxy;
private ObservableCollection<string> _disabled_server_names;
private bool _refused_code_in_responses;
private string _blocked_query_response;

[TomlIgnore]
public new bool IsNotifying
Expand Down Expand Up @@ -139,17 +141,18 @@ public ObservableCollection<string> disabled_server_names
}

/// <summary>
/// Use the REFUSED return code for blocked responses
/// Setting this to `false` means that some responses will be lies.
/// Unfortunately, `false` appears to be required for Android 8+
/// Response for blocked queries. Options are `refused`, `hinfo` (default) or
/// an IP response. To give an IP response, use the format `a:<IPv4>,aaaa:<IPv6>`.
/// Using the `hinfo` option means that some responses will be lies.
/// Unfortunately, the `hinfo` option appears to be required for Android 8+
/// </summary>
public bool refused_code_in_responses
public string blocked_query_response
{
get => _refused_code_in_responses;
get => _blocked_query_response;
set
{
_refused_code_in_responses = value;
NotifyOfPropertyChange(() => refused_code_in_responses);
_blocked_query_response = value;
NotifyOfPropertyChange(() => blocked_query_response);
}
}

Expand Down Expand Up @@ -360,7 +363,7 @@ public bool lb_estimator
NotifyOfPropertyChange(() => lb_estimator);
}
}

/// <summary>
/// Maximum time (in seconds) to wait for network connectivity before initializing the proxy.
/// Useful if the proxy is automatically started at boot, and network
Expand Down Expand Up @@ -539,6 +542,19 @@ public bool block_ipv6
}
}

/// <summary>
/// TTL for synthetic responses sent when a request has been blocked (due to IPv6 or blacklists).
/// </summary>
public int reject_ttl
{
get => _reject_ttl;
set
{
_reject_ttl = value;
NotifyOfPropertyChange(() => reject_ttl);
}
}

/// <summary>
/// Forwarding rule file.
/// </summary>
Expand All @@ -564,7 +580,7 @@ public string cloaking_rules
NotifyOfPropertyChange(() => cloaking_rules);
}
}

/// <summary>
/// Enable a DNS cache to reduce latency and outgoing traffic.
/// </summary>
Expand Down Expand Up @@ -618,15 +634,28 @@ public int cache_max_ttl
}

/// <summary>
/// TTL for negatively cached entries.
/// Minimum TTL for negatively cached entries.
/// </summary>
public int cache_neg_min_ttl
{
get => _cache_neg_min_ttl;
set
{
_cache_neg_min_ttl = value;
NotifyOfPropertyChange(() => cache_neg_min_ttl);
}
}

/// <summary>
/// Maximum TTL for negatively cached entries
/// </summary>
public int cache_neg_ttl
public int cache_neg_max_ttl
{
get => _cache_neg_ttl;
get => _cache_neg_max_ttl;
set
{
_cache_neg_ttl = value;
NotifyOfPropertyChange(() => cache_neg_ttl);
_cache_neg_max_ttl = value;
NotifyOfPropertyChange(() => cache_neg_max_ttl);
}
}

Expand Down
4 changes: 2 additions & 2 deletions SimpleDnsCrypt/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
ResourceDictionaryLocation.None,
ResourceDictionaryLocation.SourceAssembly
)]
[assembly: AssemblyVersion("0.6.7")]
[assembly: AssemblyFileVersion("0.6.7")]
[assembly: AssemblyVersion("0.6.8")]
[assembly: AssemblyFileVersion("0.6.8")]
19 changes: 13 additions & 6 deletions SimpleDnsCrypt/dnscrypt-proxy/dnscrypt-proxy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require_dnssec = true
require_nolog = true
require_nofilter = true
force_tcp = false
timeout = 2500
timeout = 5000
keepalive = 30
cert_refresh_delay = 240
fallback_resolver = '9.9.9.9:53'
Expand All @@ -19,13 +19,14 @@ log_files_max_size = 10
log_files_max_age = 7
log_files_max_backups = 1
block_ipv6 = true
reject_ttl = 600
cache = true
cache_size = 256
cache_min_ttl = 600
cache_size = 1024
cache_min_ttl = 2400
cache_max_ttl = 86400
cache_neg_ttl = 60
cache_neg_min_ttl = 60
cache_neg_max_ttl = 600
disabled_server_names = []
refused_code_in_responses = false
[query_log]
format = 'ltsv'

Expand All @@ -42,5 +43,11 @@ refused_code_in_responses = false
urls = ['https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v2/public-resolvers.md', 'https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md']
cache_file = 'public-resolvers.md'
minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
refresh_delay = 72
prefix = ''

[sources.'relays']
urls = ['https://github.com/DNSCrypt/dnscrypt-resolvers/raw/master/v2/relays.md', 'https://download.dnscrypt.info/resolvers-list/v2/relays.md']
cache_file = 'relays.md'
minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
refresh_delay = 72
prefix = ''

0 comments on commit e1ffd80

Please sign in to comment.