Closed cheatfreak47 closed 7 years ago
As you can see, it's essentially plaintext, but with a null IP address at the start of each line, with a single space between that and the URL.
Lines starting with a #
are comment lines, usually the first line is a note about the following addresses, so a simple #StopModReposts
line at the top would be fine probably.
Another example online of a hosts file can be found here, which lists tons of malware domains and ads/tracking domains. http://winhelp2002.mvps.org/hosts.txt
Hi @cheatfreak47, thank you very much for your suggestion and sorry for the delayed response. I added hosts file support to the API just now. The direct URL to this file is https://api.varden.info/smr/hosts.php. Detailed information on access and usage is available in the API access and formats wiki article.
Absolutely awesome, thanks for the quick addition, I can confirm that the current listing works absolutely perfectly with uBlock Origin and it works with uBlock Origin's Update feature.
And of course when added to a system hosts file it simply displays a connection error on all browsers/attempted connections made to the domains for the entire machine because the domain resolves to a null IP.
@bilde2910 Is this host file continuously being updated? I noticed you have a extension/plugin for browsers. While convenient, I find it unneeded since you can just use a hosts file for uBlock.
@Brottweiler Yes, the hosts file and the API endpoints are both continuously updated. The hosts file is good for blocking the sites entirely through either an adblocker, or a firewall, or a DNS filtering system (such as Pi-hole). The extensions, on the other hand, will display more detailed information about why each particular site is listed (if available), and the component ratings for advertising, redistribution and miscellaneous details. Both are officially supported, so which one you choose is up to you.
It would be a wise idea to add a hosts file format output for the API so that users can automatically update the lists by asking the API for the latest list in various blocking programs, particularly uBlock Origin.
Alternatively this would be useful for blocking such sites on computers intended for use by children by adding these entries to the system's HOSTS file.
An example of the hosts file format: