This repo is based on the awesome hosts files by StevenBlack:
https://github.com/StevenBlack/hosts
The hosts files are optimized for usage in Fortinets FortiOS fabric connectors, as they have the following limitations:
- support only for format without leading ip address
- maximum of 131.072 entries per file
- not supporting inline comments
The main unified hosts file as well as all alternate hosts file combinations are converted in the respective directories in alternates.
A simple Python script optimizes the hosts files using the following actions:
Converts the original format
0.0.0.0 ads.facebook.com
0.0.0.0 an.facebook.com
0.0.0.0 pixel.facebook.com
into the new format
ads.facebook.com
an.facebook.com
pixel.facebook.com
Divides files to have a maximum of 130.000 entries per file:
129.000 entries result in:
- hosts0 (129.000)
131.000 entries result in:
- hosts0 (130.000)
- hosts1 (1.000)
Moves inline comments like
ads.facebook.com # this domain is disturbing
to a new line
# this domain is disturbing
ads.facebook.com