From 75bf461ad4523321feb3f54154513bb79920289a Mon Sep 17 00:00:00 2001 From: Dimitry Kolyshev Date: Mon, 23 May 2022 16:04:58 +0300 Subject: [PATCH] Pull request #134: 4503 upstream conf Merge in DNS/adguard-home-wiki from 4503-upstream-conf to master Squashed commit of the following: commit 1ba7ebc67b3b42a36abb861811306b4485ce785b Author: Shared Content Manager account Date: Tue May 17 11:31:57 2022 +0300 Configuration.md edited online with Bitbucket commit ec7719acdd689dcfeb345d5832a819f67e8ba0ea Author: Shared Content Manager account Date: Tue May 17 11:31:41 2022 +0300 Configuration.md edited online with Bitbucket commit dcc97786e1eb49c1d80732069a2455b2fe5f5dd5 Author: Dimitry Kolyshev Date: Mon May 16 16:05:46 2022 +0200 4503 upstream conf commit 2280824121afb4970b3b3c4af9a66ee2eae1b0f8 Author: Dimitry Kolyshev Date: Mon May 16 15:50:15 2022 +0200 4503 upstream conf --- Configuration.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Configuration.md b/Configuration.md index c586eb5..4b1a32d 100644 --- a/Configuration.md +++ b/Configuration.md @@ -84,6 +84,8 @@ Examples: * `[/example.local/]1.1.1.1`: DNS upstream for specific domains, see below. +* `[/*.example.local/]1.1.1.1`: DNS upstream for specific subdomains, see below. + ### Specifying Upstreams For Domains You can specify upstreams that will be used for specific domains using the @@ -131,6 +133,10 @@ a configuration like this: sends queries for `*.host.com` to `1.2.3.4` except for queries for `*.www.host.com`, which are sent to `6.7.8.9`, which is the default upstream. +Since **v0.108.0-b.8** the wildcard `*` has a special meaning of "any subdomain", +so `--upstream=[/*.host.com/]1.2.3.4` will send queries for `*.host.com` to `1.2.3.4`, +but `host.com` will be forwarded to default upstreams. + #### Examples * A configuration like: @@ -153,6 +159,17 @@ sends queries for `*.host.com` to `1.2.3.4` except for queries for sends queries for `*.host.com` to `1.1.1.1:53` except for `*.maps.host.com` which are sent to `8.8.8.8:53` along with all other queries. + + * A configuration like: + + ```none + 8.8.8.8:53 + [/host.com/]1.1.1.1:53 + [/*.host.com/]2.2.2.2:53 + ``` + + sends queries for `*.host.com` to `2.2.2.2:53` except for `host.com` queries + those are sent to `1.1.1.1:53`, but all other queries are sent to `8.8.8.8:53`. ### Loading Upstreams From File