The filter configuration file is a regular text file. The name of the file is defined by the filter_file parameter of the main configuration file. Each filter is represented by a block of lines in a name = value format. Individual filters are separated with one or more empty lines.
Filters may be editted using Foxy web-based Filter Editor, or just any text editor. Foxy automatically reloads configuration when it notices that the file has been changed by another program (the same holds true for other configuration files).
See also Using content category names in URL sets.
Format:
type = filter_class_name
Internal filter class name. Do not modify. Filters of unknown types will be silently ignored when the filter configuration file is loaded. This parameter must be first in the block of lines representing a filter. Valid values: Animation Filter, Blacklist, Comment Signature Filter, etc. See filter classes. Please note, that type names are case-sensitive.
Format:
name = filter_instance_name
Unique filter name. Must not be empty. When a filter is created/renamed using proxy web interface uniqueness and non-emptiness are guaranteed. If you edit the filter configuration file manually, it's your responsibility.
Format:
enabled = boolean
The true value is assumed by default. May be set to false to disable the filter.
Format:
users = user1, user2, user3...
The users parameter defines the names of the users for which the filter will be active. A comma-delimited list of user names may be specified as a value. If empty (or missing), the filter will be active for all users. User names must match those defined in the main configuration file. IP addresses may be used instead of names if user authentication is not required.
Format:
exclude_users = user1, user2, user3...
If the users parameter is empty (which means “all users”), the exclude_users parameter may be used to list exceptions.
Format:
time = time_spec
Specifies when the filter is active. May specify time intervals, days of week, or both. When empty, the filter is always active.
The specification contains a semicolon-delimited list of elements. Each element defines days, times, or both. In the latter case days are specified first, thean a colon, then times.
Days are specified with a comma-delimited list of days of week or day of week intervals. A day of week is specified by a three-letter acronim or full name. A day of week interval consists of two day names delimited with a dash.
Times are specified with a comma-delimited list of time intervals. A time interval is start time and end time delimited with a dash. Time is spesified in hh:mm 24-hour format.
EBNF grammar for time specifications:
temespec ::= element { “;” element }
element ::= days [ “:” times ] | times
days ::= day_interval { “,” day_interval }
day_interval ::= day [ “-” day ]
day ::= “sun” | “mon” | ... | “sat” | “sunday” | “monday” | ... | “saturday”
times ::= time_interval { “,” time_interval }
time_interval ::= time [ “-” time ]
time ::= hours [ “:” minutes ]
See a quick guide to notation.
Examples:
time = 9:00-18:00Active (does the filtering) from 9:00 to 18:00. Before 9:00 and after 18:00 the filter is inactive (no filtering).
time = Monday-FridayActive Monday to Friday, no filtering on week-ends.
time = mon-fri: 9:00-18:00; sat-sun: 17:00-23:00Active Monday to Friday from 9:00 to 18:00. On week-ends active from 17:00 to 23:00.
Format:
include = url_pattern exclude = url_pattern
These two parameters define a set of URLs to apply filtering to.
The include lines list URL patterns (one per line) that define a set of pages that will be filtered.
The exclude lines define a set of exceptions, that is pages that will not be filtered.
The filter will be applied to a page if that page's URL
Example:
Apply filtering to all pages except those in three exception domains (and their subdomains):
include = * exclude = canadiantire.ca exclude = bestbuy.ca exclude = futureshop.ca
As of version 1.6.6 content category names may be used as include/exclude parameter values (as well as src_include/src_exclude for some filters). A category name must be specified exactly as defined by one of the category parameters in categories.cfg and preceded by an “@” sign.
Example:
type = Blacklist name = Block Bad Pictures enabled = true include = @Adult include = @Scum
See also URL patterns.