From 2cec13b87f642f864d853a7854a5ffd37a453bd7 Mon Sep 17 00:00:00 2001 From: Andrey Meshkov <am@adguard.com> Date: Sun, 21 Mar 2021 10:48:31 +0300 Subject: [PATCH] Added info on using multiple modifiers --- Hosts-Blocklists.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Hosts-Blocklists.md b/Hosts-Blocklists.md index c145443..892378f 100644 --- a/Hosts-Blocklists.md +++ b/Hosts-Blocklists.md @@ -88,7 +88,7 @@ Any line that starts with an exclamation mark is a comment and it will be ignore You can change the behavior of a rule by using additional modifiers. Modifiers must be located at the end of the rule after the `$` character and be separated by commas. -Example: +**Examples:** ``` ||example.org^$important @@ -98,6 +98,18 @@ Example: - `$` - a delimiter, it signals that now modifiers start - `important` - a modifier +You may want to use multiple modifiers in a rule. Separate them by commas in this case. + +``` +||example.org^$client=127.0.0.1,dnstype=A +``` + +- `||example.org^` - a matching pattern +- `$` - a delimiter, it signals that now modifiers start +- `client=127.0.0.1` - [client](#client) modifier with its value +- `,` - modifiers delimiter +- `dnstype=A` - [dnstype](#dnstype) modifier with its value + > **IMPORTANT:** If a rule contains a modifier not listed in this document, the whole rule **must be ignored**. This way we will avoid false-positives when people are trying to use unmodified browser ad blockers' filter lists like EasyList or EasyPrivacy. #### <a id="client"></a> `client`