I would like to see a 'block-file=' also with support for multiple files. There would also have to be a way for dnsmasq to re-read the file(s), either by signal or by watching the file(s).
Lists that I know of are: https://raw.githubusercontent.com/notracking/hosts-blocklists/master/dnsmasq/dnsmasq.blacklist.txt https://pgl.yoyo.org/adservers/ - there are many options to choose from to tailor the format you want to download the file in. > -----Original Message----- > From: Dnsmasq-discuss <dnsmasq-discuss-boun...@lists.thekelleys.org.uk> On > Behalf Of Ercolino de Spiacico > Sent: Wednesday, November 20, 2024 9:54 AM > To: Leonid Evdokimov <l...@darkk.net.ru>; imn...@gmail.com > Cc: dnsmasq-discuss@lists.thekelleys.org.uk > Subject: Re: [Dnsmasq-discuss] About resolution performance and adblock > > Indeed, I think the point is straight forward, there are part of dnsmasq > where we do want to comply with RFC, etc, others that are locally > significant only and can bypass certain check, adblock being one of those. > > There are a number of lists I can suggest, see this link we maintain: > > https://wiki.freshtomato.org/doku.php/adblock_dns_filtering > > However, unless you have de-duplication run internally at code level, > you can simply pick up any list and append it (>>) multiple times to a > temp file. That's what I did in my test to then echo in a bogus domain > at the bottom of the file to satisfy the grep test. This gives you great > control on the file size and number of records. > > I'll have to see what it takes to suck the patch in, but I can ask help > from our community. So yes it is of interest for sure! > > In my mind I see the margin for a new directive, e.g named block-file or > something where based on the directive syntax each domain in that file > will return the very same result e.g. > > block-file=dnsmasq.adblockme/# > Returning NX for its content and BTW this special file would only need > domains defined not the full address/local syntax > > Likewise > block-file=dnsmasq.adblockme/ > would return 0.0.0.0 > > Pretty much the same syntax as we currently have for individual domains. > > Somehow, at code level I do see how this could be treated as an upstream > server with "special file operation" and queried with the highest > priority in a hard-coded strict-order leaving unresolved domains to the > standard DNS operation (strict,no-fail,round-robin) > > Thanks > > > > On 20/11/2024 15:06, Leonid Evdokimov wrote: > > On Tue, Nov 19, 2024 at 8:05 PM Ercolino de Spiacico > > <bellocar...@hotmail.com> wrote: > >> If given the possibility, I would be very happy to map a file in RAM > >> knowing > that > >> this is handled differently from the "standard" conf-file. > > > > I agree with this point and I'm developing libddt (dense domain table) > > that is basically a mmap()'able tire representing a list of domains. > > The data structure resembles the one libpsl uses to store > > publicsuffix.org database. > > > > Preliminary results for a test-case of 500k domains were ~2 MiB of RAM > > usage and sub-10ms resolution latency. > > > > However, I got no replies for my call-for-test-cases[1] a few months > > ago, so I moved my focus to other sub-projects of that project for a > > while. > > > > I would be grateful if you can share your block-lists with me, so I > > can test my code with more cases. > > > > Also, please tell me, if you have any interest in testing the > > patch-set. We can't know if it'll be merged to the main dnsmasq repo, > > but extra testing and feedback kinda increases chances of that > > happening :-) > > > > [1] https://lists.thekelleys.org.uk/pipermail/dnsmasq- > discuss/2024q3/017627.html > > > > > _______________________________________________ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss