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
The idea is to allow adding rules for specific clients as easy as possible.
Spec
The $client modifier allows specifying clients this rule will be working for. It accepts both client names or IP addresses.
The syntax is:
$client=value1|value2|...
You can also specify "restricted" clients by adding a ~ character before the client IP or name. In this case, the rule will not be applied to this client's DNS requests.
$client=~value1
Specifying client names
Client names usually contain spaces or other special characters, that's why you should enclose the name in quotes (both double-quotes and single-quotes are supported). If the client name contains quotes, use \ to escape them. Also, you need to escape commas (,) and pipes (|).
Please note, that when specifying a "restricted" client, you must keep ~ out of the quotes.
Examples
@@||*^$client=127.0.0.1 -- unblock everything for localhost
||example.org^$client='Frank\'s laptop' -- block example.org for the client named Frank's laptop only. Note that quote (') must be escaped.
||example.org^$client=~'Mary\'s\, John\'s\, and Boris\s laptops' -- block example.org for everyone except the client named Mary, John, and Boris. Note that comma (,) must be escaped as well.
||example.org^$client=~Mom|~Dad|Kids -- block example.org for Kids, but not for Mom and Dad. This example demonstrates how to specify multiple clients in one rule.
The text was updated successfully, but these errors were encountered:
The idea is to allow adding rules for specific clients as easy as possible.
Spec
The
$client
modifier allows specifying clients this rule will be working for. It accepts both client names or IP addresses.The syntax is:
You can also specify "restricted" clients by adding a
~
character before the client IP or name. In this case, the rule will not be applied to this client's DNS requests.Specifying client names
Client names usually contain spaces or other special characters, that's why you should enclose the name in quotes (both double-quotes and single-quotes are supported). If the client name contains quotes, use
\
to escape them. Also, you need to escape commas (,
) and pipes (|
).Please note, that when specifying a "restricted" client, you must keep
~
out of the quotes.Examples
@@||*^$client=127.0.0.1
-- unblock everything for localhost||example.org^$client='Frank\'s laptop'
-- blockexample.org
for the client namedFrank's laptop
only. Note that quote ('
) must be escaped.||example.org^$client=~'Mary\'s\, John\'s\, and Boris\s laptops'
-- blockexample.org
for everyone except the client namedMary, John, and Boris
. Note that comma (,
) must be escaped as well.||example.org^$client=~Mom|~Dad|Kids
-- blockexample.org
forKids
, but not forMom
andDad
. This example demonstrates how to specify multiple clients in one rule.The text was updated successfully, but these errors were encountered: