[blocking]
Which domains are blocked, which never are, and which devices skip filtering.
Keys
| Key | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | true | Filter queries against the lists. The web UI's pause buttons switch this off for a while without touching the file. |
| mode | string | "null" | How a blocked query is answered: "null" (A gets 0.0.0.0, AAAA gets ::, other types an empty answer), "nxdomain" or "refused". |
| lists | array of strings | two lists, below | Blocklists: http(s) URLs or local file paths. Hosts files, plain domain lists and AdBlock-style lines are accepted and can be mixed. |
| allow | array of domains | [] | Domains that are never blocked, with their subdomains. Allow wins over every list. |
| deny | array of domains | [] | Extra domains to block, with their subdomains. |
| unfiltered_clients | array of IPs or CIDRs | [] | Clients that are never blocked. |
| refresh | duration | "24h" | How often the lists are downloaded again. The minimum is 1m. |
| cache_dir | path | "/var/lib/sito/lists" | Where downloaded lists are saved. If a download fails, the saved copy is used. |
The default lists are StevenBlack's hosts and
HaGeZi's multi list, about 229,000 domains together.
List formats
Sito reads each line of a list and keeps the domain. These three forms are recognised, and one list can mix them. A listed domain also blocks its subdomains.
# hosts file
0.0.0.0 ads.example.com
# plain domain list
tracker.example.net
# AdBlock-style
||telemetry.example.org^
Unfiltered clients
Some devices misbehave behind a filter: a work laptop on a VPN, a smart TV that refuses to
start. List their addresses in unfiltered_clients and their queries skip step 3 of the
pipeline: allow, deny and the lists. Local records and conditional forwarding still apply, and
their queries are still logged.
Example
[blocking]
lists = [
"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts",
]
allow = ["example.com"]
# work laptop: the VPN breaks when filtered
unfiltered_clients = ["192.168.1.42", "192.168.1.0/28"]
Save the file and Sito reloads it within seconds. Changes made in the web UI are written back here, with your comments kept.