Re: [Dnsmasq-discuss] Feature request = block-conf

2022-04-29 Thread Ercolino de Spiacico
> OK, but as you rightly pointed out a couple of messages ago, all these > operations are performed before the service dnsmasq restart. > > Because of this I have performed an additional test to complete the > picture: > > my usual 650K list of domains is now unzipped and I have simply scripted >

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-31 Thread Ercolino de Spiacico
My understanding is that the script-conf feature was to be used to reduce filesystem storage usage, ie instead of a conf-file full of lines like address=/domain1.com/ address=/domain2.com/ Juts the list of domains could be stored, in compressed form, and then they would be decompressed and

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-31 Thread Simon Kelley
On 30/03/2022 12:13, Ercolino de Spiacico wrote: It looks like your script which downloads the blocked domains file and compresses it takes 15s, then dnsmasq takes 15s to uncompress the list and load it into memory and sort. The first delay can be solved by doing the download before

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-30 Thread Ercolino de Spiacico
It looks like your script which downloads the blocked domains file and compresses it takes 15s, then dnsmasq takes 15s to uncompress the list and load it into memory and sort. The first delay can be solved by doing the download before stopping the old dnsmasq process. The second is amenable

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-29 Thread Simon Kelley
On 28/03/2022 11:49, Ercolino de Spiacico wrote: This Internet list above (https://hosts.oisd.nl) is 40MB uncompressed, the regex extracts domains-only so shrinking it to 60% of its original size and the gzip compression shrinks much further. Decompressing and scripting it up of course

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-28 Thread Ercolino de Spiacico
This Internet list above (https://hosts.oisd.nl) is 40MB uncompressed, the regex extracts domains-only so shrinking it to 60% of its original size and the gzip compression shrinks much further. Decompressing and scripting it up of course takes time. All of that looks like stuff which can

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-27 Thread Simon Kelley
On 27/03/2022 08:52, Ercolino de Spiacico wrote: >> [ -f list.of.domain ] && { create the formatted configuration } >> >> would always fail at dnsmasq level if the list.of.domains doesn't exist >> despite the file existence condition defined. I'm not sure this is meant >> to be and/or

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-27 Thread Ercolino de Spiacico
>> [ -f list.of.domain ] && { create the formatted configuration } >> >> would always fail at dnsmasq level if the list.of.domains doesn't exist >> despite the file existence condition defined. I'm not sure this is meant >> to be and/or if there's a smart workaround that can be used. > > I

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-26 Thread Simon Kelley
On 24/03/2022 09:28, Ercolino de Spiacico wrote: I've just added it to 2.87test8 Please test and report back. Ok after a first implementation on my test environment this is my feedback: A- Great feature! the scripting + gzip + zcat is a godsend. Yes it pushed the CPU up a bit, yes the

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-24 Thread Ercolino de Spiacico
I've just added it to 2.87test8 Please test and report back. Ok after a first implementation on my test environment this is my feedback: A- Great feature! the scripting + gzip + zcat is a godsend. Yes it pushed the CPU up a bit, yes the the script takes longer to execute (although this is

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-08 Thread Rance Hall via Dnsmasq-discuss
Ercolino:I can't speak for Simon and the rest of the Dnsmasq team (mostly because I'm not on it) but I appreciate your discussion and explanation of your need.  I would have responded sooner, but I've had a medical emergency with my wife and was off the net for a few days being with family in

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-04 Thread Simon Kelley
On 04/03/2022 20:12, Ercolino de Spiacico wrote: >How does dnsmasq behave if there is a configuration error in the config >file elsewhere?  If the syntax is broken then it fails hard. Don't see >why this wouldn't be true of a suplemental config script being referred >to in the main one.And

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-04 Thread Ercolino de Spiacico
>How does dnsmasq behave if there is a configuration error in the config >file elsewhere? If the syntax is broken then it fails hard. Don't see >why this wouldn't be true of a suplemental config script being referred >to in the main one.And as to --fail-safe: I don't see how this is

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-04 Thread Rance Hall via Dnsmasq-discuss
You are most welcome. Sent from my iPhone > On Mar 4, 2022, at 12:19 PM, Simon Kelley wrote: > > Thanks Rance, you saved me from writing the same answer. > > Simon. > > >> On 04/03/2022 17:00, Rance Hall via Dnsmasq-discuss wrote: >> How does dnsmasq behave if there is a configuration

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-04 Thread Simon Kelley
Thanks Rance, you saved me from writing the same answer. Simon. On 04/03/2022 17:00, Rance Hall via Dnsmasq-discuss wrote: How does dnsmasq behave if there is a configuration error in the config file elsewhere?  If the syntax is broken then it fails hard.  Don't see why this wouldn't be true

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-04 Thread Rance Hall via Dnsmasq-discuss
How does dnsmasq behave if there is a configuration error in the config file elsewhere?  If the syntax is broken then it fails hard.  Don't see why this wouldn't be true of a suplemental config script being referred to in the main one.And as to --fail-safe:  I don't see how this is reasonable,

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-04 Thread Ercolino de Spiacico
> I've just added it to 2.87test8 > Please test and report back. I'm finally managed to find a way to build from sources. One initial feedback: I cross referenceed the conf script e.g. conf-scrip=/tmp/adblock-expander.sh If the file doesn't exists or has a broken syntax it will make the

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-02-10 Thread Ercolino de Spiacico
> I've just added it to 2.87test8 > Please test and report back. I unfortunately don't have a build environment, so I hope someone else here can help with the testing... Looking forward to the outcome. ___ Dnsmasq-discuss mailing list

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-02-06 Thread Andrew Miskell via Dnsmasq-discuss
> On Feb 6, 2022, at 15:55, Ercolino de Spiacico > wrote: > > From what version is this --conf-script made available? > > root@router:/tmp# dnsmasq -v > Dnsmasq version 2.86 Copyright (c) 2000-2021 Simon Kelley > Compile time options: IPv6 GNU-getopt no-RTC no-DBus no-UBus no-i18n no-IDN

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-02-06 Thread Ercolino de Spiacico
From what version is this --conf-script made available? root@router:/tmp# dnsmasq -v Dnsmasq version 2.86 Copyright (c) 2000-2021 Simon Kelley Compile time options: IPv6 GNU-getopt no-RTC no-DBus no-UBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset Tomato-helper auth cryptohash

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-02-06 Thread Simon Kelley
On 06/02/2022 05:54, Ercolino de Spiacico wrote: > Opinions, all? The scripting solution would indeed solve the original feature request in my view. But there's a new point that is now coming into scope. Just to give the magnitude here I came across lists with 1.2M domains, 40MB

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-02-05 Thread Ercolino de Spiacico
> Opinions, all? The scripting solution would indeed solve the original feature request in my view. But there's a new point that is now coming into scope. Just to give the magnitude here I came across lists with 1.2M domains, 40MB uncompressed pre 'address=//' formatting. Loading such a list

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-02-05 Thread Lonnie Abelbeck
> On Feb 5, 2022, at 5:32 AM, Simon Kelley wrote: > > Let's try thinking out of the box here. Given the motivation to save storage, > I was wondering if there could be a way to use compression, gzip etc to save > more space. > > Building a decompressor into dnsmasq seems ugly, but then I

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-02-05 Thread Geert Stappers via Dnsmasq-discuss
On Sat, Feb 05, 2022 at 11:32:44AM +, Simon Kelley wrote: > On 04/02/2022 09:46, Ercolino de Spiacico wrote: > > I have a feature request. > > > > Since dnsmasq is extremely popular on embedded devices with limited > > resources (e.g. router) it would be a huge improvement to have a new > >

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-02-05 Thread Simon Kelley
Let's try thinking out of the box here. Given the motivation to save storage, I was wondering if there could be a way to use compression, gzip etc to save more space. Building a decompressor into dnsmasq seems ugly, but then I came up with the option of --conf-script=/path/to/script.

[Dnsmasq-discuss] Feature request = block-conf

2022-02-04 Thread Ercolino de Spiacico
I have a feature request. Since dnsmasq is extremely popular on embedded devices with limited resources (e.g. router) it would be a huge improvement to have a new directive to block a list of domains. Practical example: We currently need to add an external file to the main config (preferred)