You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration.md
+22-16Lines changed: 22 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ All logging options are optional.
72
72
73
73
## Init Strategy
74
74
75
-
A couple of features use an "init/loading strategy" which configures behavior at Blocky startup.
75
+
A couple of features use an "init/loading strategy" which configures behavior at Blocky startup.
76
76
This applies to all of them. The default strategy is blocking.
77
77
78
78
| strategy | Description |
@@ -180,13 +180,13 @@ Blocky supports different upstream strategies (default `parallel_best`) that det
180
180
181
181
Currently available strategies:
182
182
183
-
-`parallel_best`: blocky picks 2 random (weighted) resolvers from the upstream group for each query and returns the answer from the fastest one.
184
-
If an upstream failed to answer within the last hour, it is less likely to be chosen for the race.
185
-
This improves your network speed and increases your privacy - your DNS traffic will be distributed over multiple providers.
183
+
-`parallel_best`: blocky picks 2 random (weighted) resolvers from the upstream group for each query and returns the answer from the fastest one.
184
+
If an upstream failed to answer within the last hour, it is less likely to be chosen for the race.
185
+
This improves your network speed and increases your privacy - your DNS traffic will be distributed over multiple providers.
186
186
(When using 10 upstream servers, each upstream will get on average 20% of the DNS requests)
187
-
-`random`: blocky picks one random (weighted) resolver from the upstream group for each query and if successful, returns its response.
188
-
If the selected resolver fails to respond, a second one is picked to which the query is sent.
189
-
The weighting is identical to the `parallel_best` strategy.
187
+
-`random`: blocky picks one random (weighted) resolver from the upstream group for each query and if successful, returns its response.
188
+
If the selected resolver fails to respond, a second one is picked to which the query is sent.
189
+
The weighting is identical to the `parallel_best` strategy.
190
190
Although the `random` strategy might be slower than the `parallel_best` strategy, it offers more privacy since each request is sent to a single upstream.
191
191
-`strict`: blocky forwards the request in a strict order. If the first upstream does not respond, the second is asked, and so on.
192
192
@@ -578,9 +578,15 @@ queries, NXDOMAIN for other types):
578
578
### Block TTL
579
579
580
580
TTL for answers to blocked domains can be set to customize the time (in **duration format**) clients ask for those
581
-
domains again. Default Block TTL is **6hours**. This setting only makes sense when `blockType` is set to `nxDomain` or
582
-
`zeroIP`, and will affect how much time it could take for a client to be able to see the real IP address for a domain
583
-
after receiving the custom value.
581
+
domains again. Default Block TTL is **6 hours**. This setting applies to all blocking modes and will affect how much
582
+
time it could take for a client to be able to see the real IP address for a domain after receiving the blocked response.
583
+
584
+
**For `zeroIP` and custom IP modes:** The TTL is applied to the returned A/AAAA records in the answer section.
585
+
586
+
**For `nxDomain` mode:** The TTL is applied to the SOA record in the authority section. Per [RFC 2308](https://www.rfc-editor.org/rfc/rfc2308),
587
+
Blocky includes an SOA record in NXDOMAIN responses to enable proper negative caching by stub resolvers.
588
+
The blockTTL value is used for both the SOA's TTL and its MINIMUM field, ensuring clients cache the
SUDN (Special Use Domain Names) are always enabled by default as they are required by various RFCs.
852
+
SUDN (Special Use Domain Names) are always enabled by default as they are required by various RFCs.
847
853
Some RFCs have optional recommendations, which are configurable as described below.
848
854
However, you can completely deactivate the blocking of SUDN by setting enable to false.
849
855
Warning! You should only disable this if your upstream DNS server is local, as it shouldn't be disabled for remote upstreams.
@@ -921,7 +927,7 @@ These settings apply only to the resolver under which they are nested.
921
927
#### Refresh / Reload
922
928
923
929
To keep source contents up-to-date, blocky can periodically refresh and reparse them. Default period is
924
-
**4 hours**. You can configure this by setting the `refreshPeriod` parameter to a value in **duration format**.
930
+
**4 hours**. You can configure this by setting the `refreshPeriod` parameter to a value in **duration format**.
925
931
A value of zero or less will disable this feature.
926
932
927
933
!!! example
@@ -958,7 +964,7 @@ Configures how HTTP(S) sources are downloaded:
958
964
959
965
### Strategy
960
966
961
-
See [Init Strategy](#init-strategy).
967
+
See [Init Strategy](#init-strategy).
962
968
In this context, "init" is loading and parsing each source, and an error is a single source failing to load/parse.
963
969
964
970
!!! example
@@ -970,7 +976,7 @@ In this context, "init" is loading and parsing each source, and an error is a si
970
976
971
977
### Max Errors per Source
972
978
973
-
Number of errors allowed when parsing a source before it is considered invalid and parsing stops.
979
+
Number of errors allowed when parsing a source before it is considered invalid and parsing stops.
974
980
A value of -1 disables the limit.
975
981
976
982
!!! example
@@ -982,8 +988,8 @@ A value of -1 disables the limit.
982
988
983
989
### Concurrency
984
990
985
-
Blocky downloads and processes sources concurrently. This allows limiting how many can be processed in the same time.
986
-
Larger values can reduce the overall list refresh time at the cost of using more RAM. Please consider reducing this value on systems with limited memory.
991
+
Blocky downloads and processes sources concurrently. This allows limiting how many can be processed in the same time.
992
+
Larger values can reduce the overall list refresh time at the cost of using more RAM. Please consider reducing this value on systems with limited memory.
0 commit comments