From c4dc3ba007fe34d6b7704ffb5ec812a436c326e7 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Sat, 5 Sep 2020 17:29:07 +0100 Subject: filter: fix documentation about rules the file docs/filter-howto.txt was removed, as it contained misleading information since it was first checked in. it suggests the syntax for filter rules is fnmatch()-like, when in fact they need to be specified as posix regular expressions. additionally it contained a lot of utterly unrelated and irrelevant/ outdated text. a few examples with the correct syntax have now been added to tinyproxy.conf.5 manpage. closes #212 --- docs/man5/tinyproxy.conf.txt.in | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'docs/man5') diff --git a/docs/man5/tinyproxy.conf.txt.in b/docs/man5/tinyproxy.conf.txt.in index b5619dd..66dd04e 100644 --- a/docs/man5/tinyproxy.conf.txt.in +++ b/docs/man5/tinyproxy.conf.txt.in @@ -256,6 +256,27 @@ Tinyproxy supports filtering of web sites based on URLs or domains. This option specifies the location of the file containing the filter rules, one rule per line. +Rules are specified as POSIX basic regular expressions (BRE), unless +FilterExtended is activated. +Comment lines start with a `#` character. + +Example filter file contents: + + # filter exactly cnn.com + ^cnn\.com$ + + # filter all subdomains of cnn.com, but not cnn.com itself + .*\.cnn.com$ + + # filter any domain that has cnn.com in it, like xcnn.comfy.org + cnn\.com + + # filter any domain that ends in cnn.com + cnn\.com$ + + # filter any domain that starts with adserver + ^adserver + =item B If this boolean option is set to `Yes` or `On`, filtering is -- cgit v1.2.3