@@ -39,9 +39,11 @@ public class DnscryptProxyConfiguration : PropertyChangedBase
3939 private int _log_files_max_age ;
4040 private int _log_files_max_backups ;
4141 private bool _block_ipv6 ;
42+ private int _reject_ttl ;
4243 private string _forwarding_rules ;
4344 private string _cloaking_rules ;
44- private int _cache_neg_ttl ;
45+ private int _cache_neg_min_ttl ;
46+ private int _cache_neg_max_ttl ;
4547 private int _cache_max_ttl ;
4648 private int _cache_min_ttl ;
4749 private int _cache_size ;
@@ -51,7 +53,7 @@ public class DnscryptProxyConfiguration : PropertyChangedBase
5153 private Dictionary < string , Static > _static ;
5254 private string _proxy ;
5355 private ObservableCollection < string > _disabled_server_names ;
54- private bool _refused_code_in_responses ;
56+ private string _blocked_query_response ;
5557
5658 [ TomlIgnore ]
5759 public new bool IsNotifying
@@ -139,17 +141,18 @@ public ObservableCollection<string> disabled_server_names
139141 }
140142
141143 /// <summary>
142- /// Use the REFUSED return code for blocked responses
143- /// Setting this to `false` means that some responses will be lies.
144- /// Unfortunately, `false` appears to be required for Android 8+
144+ /// Response for blocked queries. Options are `refused`, `hinfo` (default) or
145+ /// an IP response. To give an IP response, use the format `a:<IPv4>,aaaa:<IPv6>`.
146+ /// Using the `hinfo` option means that some responses will be lies.
147+ /// Unfortunately, the `hinfo` option appears to be required for Android 8+
145148 /// </summary>
146- public bool refused_code_in_responses
149+ public string blocked_query_response
147150 {
148- get => _refused_code_in_responses ;
151+ get => _blocked_query_response ;
149152 set
150153 {
151- _refused_code_in_responses = value ;
152- NotifyOfPropertyChange ( ( ) => refused_code_in_responses ) ;
154+ _blocked_query_response = value ;
155+ NotifyOfPropertyChange ( ( ) => blocked_query_response ) ;
153156 }
154157 }
155158
@@ -360,7 +363,7 @@ public bool lb_estimator
360363 NotifyOfPropertyChange ( ( ) => lb_estimator ) ;
361364 }
362365 }
363-
366+
364367 /// <summary>
365368 /// Maximum time (in seconds) to wait for network connectivity before initializing the proxy.
366369 /// Useful if the proxy is automatically started at boot, and network
@@ -539,6 +542,19 @@ public bool block_ipv6
539542 }
540543 }
541544
545+ /// <summary>
546+ /// TTL for synthetic responses sent when a request has been blocked (due to IPv6 or blacklists).
547+ /// </summary>
548+ public int reject_ttl
549+ {
550+ get => _reject_ttl ;
551+ set
552+ {
553+ _reject_ttl = value ;
554+ NotifyOfPropertyChange ( ( ) => reject_ttl ) ;
555+ }
556+ }
557+
542558 /// <summary>
543559 /// Forwarding rule file.
544560 /// </summary>
@@ -564,7 +580,7 @@ public string cloaking_rules
564580 NotifyOfPropertyChange ( ( ) => cloaking_rules ) ;
565581 }
566582 }
567-
583+
568584 /// <summary>
569585 /// Enable a DNS cache to reduce latency and outgoing traffic.
570586 /// </summary>
@@ -618,15 +634,28 @@ public int cache_max_ttl
618634 }
619635
620636 /// <summary>
621- /// TTL for negatively cached entries.
637+ /// Minimum TTL for negatively cached entries.
638+ /// </summary>
639+ public int cache_neg_min_ttl
640+ {
641+ get => _cache_neg_min_ttl ;
642+ set
643+ {
644+ _cache_neg_min_ttl = value ;
645+ NotifyOfPropertyChange ( ( ) => cache_neg_min_ttl ) ;
646+ }
647+ }
648+
649+ /// <summary>
650+ /// Maximum TTL for negatively cached entries
622651 /// </summary>
623- public int cache_neg_ttl
652+ public int cache_neg_max_ttl
624653 {
625- get => _cache_neg_ttl ;
654+ get => _cache_neg_max_ttl ;
626655 set
627656 {
628- _cache_neg_ttl = value ;
629- NotifyOfPropertyChange ( ( ) => cache_neg_ttl ) ;
657+ _cache_neg_max_ttl = value ;
658+ NotifyOfPropertyChange ( ( ) => cache_neg_max_ttl ) ;
630659 }
631660 }
632661
0 commit comments