|
Adapting “hosts†file block lists to Privoxy's way of blocking…
|
|
Aug. 01, 2015, 08:52 AM
(This post was last modified: Aug. 01, 2015 09:52 PM by Faxopita.)
Post: #11
|
|||
|
|||
|
RE: Adapting “hosts†file block lists to Privoxy's way of blocking…
In order to differentiate a top or second-level domain from the rest of the address, I've made the script to rely on the most common generic extensions. It's a personal choice and found it fair enough for me. However, someone could use instead the provided in-archive SLD.txt file—which currently contains 7313 domain extensions—and make the script rely on it.
Script portion dealing with domain extensions: Code: \(\.[a-z0-9]\{2\}\(\.[a-z0-9]\{2,3\}\)\?\|\.[a-z0-9]\{3\}\(\.[a-z0-9]\{2\}\)\?\|\.[a-z0-9\-]\{4,\}\|\(\.xn--[^\.]\+\)\{2\}\)$Sources of domain extensions:
The most exhaustive one though seems to be: https://publicsuffix.org/list/public_suffix_list.dat File SLD.txt is based upon this latter list. |
|||
|
« Next Oldest | Next Newest »
|

Search
Member List
Calendar
Help





![[-]](images/ONi/collapse.gif)