Trusted Recursive Resolver: Difference between revisions

Jump to navigation Jump to search
Updated the settings descriptions
(Provide link to official RFC)
(Updated the settings descriptions)
Line 4: Line 4:
transfers and improved performance.
transfers and improved performance.


== Setting DNS-over-HTTPS in Firefox ==
== DNS-over-HTTPS Settings in Firefox ==


* Set `network.trr.mode` to 2 to make DNS Over HTTPS the browser's first choice but use regular DNS as a fallback (0 is "off by default", 1 lets Firefox pick whichever is faster, 3 for TRR only mode, 5 to explicitly turn it off).
All preferences for the DNS-over-HTTPS functionality in Firefox are located under the `network.trr` prefix (TRR == Trusted Recursive Resolver). The support for these were added in Firefox 62.
* Set `network.trr.uri`. Ones that you may use: https://mozilla.cloudflare-dns.com/dns-query ([https://developers.cloudflare.com/1.1.1.1/commitment-to-privacy/privacy-policy/firefox/ Privacy Policy]), https://dns.google.com/experimental


TRR is preffed OFF by default and you need to set a URI for an available DOH
=== network.trr.mode ===
server to be able to use it. Since the URI for DOH is set with a name itself,
set which resolver mode you want.
it may have to use the native resolver for bootstrapping. (Optionally, the
user can set the IP address of the DOH server in a pref to avoid the required
initial native resolve.)


All prefs for TRR are under the "network.trr" hierarchy.
0 - Off (default). use standard native resolving only (don't use TRR at all)
 
1 - Race (removed)
 
2 - First. Use TRR first, and only if the name resolve fails use the native resolver as a fallback.
 
3 - Only. Only use TRR. Never use the native (after the initial setup).
 
4 - Shadow. (removed)
 
5 - Off by choice. This is the same as 0 but marks it as done by choice and not done by default.
 
=== network.trr.uri ===
 
(default: none) set the URI for your DoH server. That's the URL Firefox will issue its HTTP request to. It must be a HTTPS URL. If "useGET" is enabled, Firefox will append "?dns=...." to the URI when it makes its HTTP requests. For the default POST requests, they will be issued to exactly the specified URI.
 
Publicly announced servers include:
- https://mozilla.cloudflare-dns.com/dns-query
- https://dns.google/dns-query
 
For more servers, see this unofficial list of DoH servers: https://github.com/curl/curl/wiki/DNS-over-HTTPS.
 
===network.trr.credentials===
 
(default: none) set credentials that will be used in the HTTP requests to the DoH end-point. It is the right-hand side content, the value, sent in the Authorization: request header.
 
=== network.trr.wait-for-portal ===
 
(default: true) set this boolean to **true** to tell Firefox to wait for the captive portal detection before TRR is used. (on Android, this will default to **false** since the captive portal handling is done outside of Firefox, by the OS itself.)
 
=== network.trr.allow-rfc1918 ===
 
(default: false) set this to true to allow RFC 1918 private addresses in TRR responses. When set to false, any such response will be considered invalid and won't be used.
 
=== network.trr.useGET ===
 
(default: false) When the browser issues a request to the DoH server to resolve host names, it can do that using POST or GET. By default Firefox will use POST, but by toggling this you can enforce GET to be used instead.
 
=== network.trr.confirmationNS ===
 
(default: example.com) Firefox will check an NS entry at startup to verify that TRR works to ensure proper configuration. This preference sets which domain to check. The verification only checks for a positive answer, it doesn't actually care what the response data says. Set this to `skip` to completely avoid confirmation.
 
=== network.trr.bootstrapAddress ===
 
(default: none) by setting this field to the IP address of the host name used in "network.trr.uri", you can bypass using the system native resolver for it.
 
=== network.trr.blacklist-duration ===
 
(default: 60) is the number of seconds a name will be kept in the TRR blacklist until it expires and then will be tried with TRR again. The default duration is one minute.
 
Entries are added to the TRR blacklist when the resolution fails with TRR but works with the native resolver, or if the subsequent connection with a TRR resolved host name fails but works with a retry that is resolved natively. When a hostname is added to the TRR, its domain gets checked in the background to see if the whole domain should be blacklisted to ensure a smoother ride going forward.
 
=== network.trr.request-timeout ===
 
(default: 3000) is the number of milliseconds a request and the corresponding response from the DoH server is allowed to take until considered failed and discarded.
 
=== network.trr.early-AAAA ===
 
(default: false) For each normal name resolution, Firefox issues one HTTP request for A entries and another for AAAA entries. The responses come back separately and can come in any order. If the A records arrive first, Firefox will—as an optimization— continue and use them without waiting for the second response. If the AAAA records arrive first, Firefox will only continue and use them immediately if this option is set to **true**.
 
=== network.trr.max-fails ===
 
(default: 5) If this many DoH requests fail in a row, consider TRR broken and go back to verify-NS state. This is meant to detect situations when the DoH server dies.
 
=== network.trr.disable-ECS ===
 
(default: true) If set, TRR asks the resolver to disable ECS (EDNS Client Subnet: the method where the resolver passes on the subnet of the client asking the question). Some resolvers will use ECS to the upstream if this request is not passed on to them.
 
=== network.trr.excluded-domains ===
 
(default: `localhost,local`) Comma separated list of domain names to be resolved using the native resolver instead of TRR.


== Dynamic Blacklist ==
== Dynamic Blacklist ==
2

edits

Navigation menu