Documentation: clarify the role of extensions, and how they work.

This commit is contained in:
StevenBlack 2018-05-13 23:46:22 -04:00
parent 9a890f0ec5
commit 10e61eaed9
2 changed files with 15 additions and 10 deletions

View File

@ -1,19 +1,21 @@
# Extensions
Use subfolders under the `extensions` folder to house extensions to the final unified hosts file.
Use subfolders under this `extensions` folder to house data sources for extensions to the default unified hosts file.
Currently, this repo includes four extensions:
Currently, this repo includes data sources for four extensions:
* `gambling` for common online betting sites,
* `social` for common social media sites,
* `porn` for porn sites, and
* `fakenews` for fake news sites.
* `gambling` for common online betting sites,
* `porn` for porn sites, and
* `social` for common social media sites,
Here are some sample calls, which vary which extensions are included.
**Using Python 3**:
Create a hosts file that includes domain blocking for porn, social media, and gambling.
python3 updateHostsFile.py --auto --extensions porn social gambling
or, in short form:
@ -30,5 +32,3 @@ or, in short form:
python updateHostsFile.py -a -e porn social gambling
More built-in extensions are coming soon.

View File

@ -33,9 +33,14 @@ Host file source | Description | Home page | Raw hosts | Update frequency | Lice
## Extensions
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
The unified hosts file is extensible. Extensions are used to block domains by category.
Extensions are optional, and are added to the base hosts file. Extensions are combined in variuous ways wth the default hosts file, and the combined products are stored in the [`alternates`](https://github.com/StevenBlack/hosts/tree/master/alternates) folder.
For example, you may want to block porn domains in addition to the adware and malware we block by default. That hosts file is stored in the porn subfolder of the [alternates](https://github.com/StevenBlack/hosts/tree/master/alternates) folder.
Data for extensions is stored in the [extensions folder](https://github.com/StevenBlack/hosts/tree/master/extensions). You manage extensions by curating the
[extensions folder tree](https://github.com/StevenBlack/hosts/tree/master/extensions) where you will find the data for `fakenews`, `social`, `gambling`, and `porn` extension data that we maintain and provide for you.
## Generate your own unified hosts file